prisma / prisma1

💾 Database Tools incl. ORM, Migrations and Admin UI (Postgres, MySQL & MongoDB) [deprecated]
https://v1.prisma.io/docs/
Apache License 2.0
16.55k stars 863 forks source link

Support functions in local development server (graphcool-dev) #797

Closed sorenbs closed 6 years ago

sorenbs commented 6 years ago

The local development server should support functions.

Deploying a service to the local development server should deploy all functions to a local faas environment. This should work seamlessly, and invoking functions from the Graphcool CRUD-API should work as normal.

Logs from local functions

It is possible to read logs from local functions like this:

docker tail -f localfaas

Npm modules

If you are using npm modules you need to have a package.json file and install the modules locally before deploying to Graphcool

wasd171 commented 6 years ago

I see that this issue is closed, but README states that

Note: functions are currently not working for local cluster setups (use the BaaS deployment for now).

When running graphcool deploy for an initial helloWorld example to my local Docker setup I get

Cannot read property 'pipesCount' of undefined

Am I missing something?

marktani commented 6 years ago

What's your graphcool version? Did you try graphcool local pull, then redeploy?

wasd171 commented 6 years ago
❯ graphcool version
graphcool/0.7.0 (darwin-x64) node-v8.0.0

I have just tried running graphcool local pull and graphcool deploy, but no luck, I get the same message

marktani commented 6 years ago

Could you please share your service definition + reproduction steps in a new Github repo? 🙂

wasd171 commented 6 years ago

Sure, but it's actually just as simple as graphcool init && graphcool local up && graphcool deploy

wasd171 commented 6 years ago

Here is the sample repo: https://github.com/wasd171/graphcool-local-function-error

marktani commented 6 years ago

Sure, but it's actually just as simple as graphcool init && graphcool local up && graphcool deploy

Can't reproduce this with graphcool/0.8.0-alpha.6 (darwin-x64) node-v8.3.0.

marktani commented 6 years ago

Could you try it with 0.8.0-alpha.6? I created https://github.com/graphcool/graphcool/issues/852 to further discuss this @wasd171.