picosam
05/05/2018, 4:02 PMpost-deploy:
Running graphql get-schema --project prisma !
▸ 'ENOENT': spawn graphql ENOENT
Get in touch if you need help: <https://www.graph.cool/forum>
To get more detailed output, run $ export DEBUG="*"
I’m using yarn workspaces, so my GraphQL API is in a folder called api that is at the same level as my prisma folder. The former contains my .graphqlconfig.yml file and the latter contains my prisma.yml file.nilan
05/05/2018, 4:57 PMgraphql-cli?picosam
05/05/2018, 6:32 PMnilan
05/05/2018, 6:48 PMpicosam
05/05/2018, 7:14 PMpicosam
05/05/2018, 7:14 PMgraphql-cli globally and it worked, but I get the error message now that the file I want to generate does not exist!picosam
05/05/2018, 7:15 PMgraphql create at least oncepicosam
05/05/2018, 7:17 PMpost-deploy:
Running graphql get-schema --project prisma ✔
Running graphql prepare !
▸ Schema '/Users/Sammy/Projects/testing-yarn-workspaces/api/src/generated/prisma.graphqls' not found.
▸picosam
05/05/2018, 7:20 PMprisma deploy once more; now I’m getting Syntax Error: Cannot parse the unexpected character "/". in graphql prepare!nilan
05/05/2018, 7:24 PM@unique directive to your schema?picosam
05/05/2018, 7:25 PMnilan
05/05/2018, 7:25 PMpicosam
05/05/2018, 7:26 PMdatamodel.graphql file that gets generated by prisma initpicosam
05/05/2018, 7:27 PMprisma deploy will not generate the files if they do not already exist?nilan
05/05/2018, 8:22 PMpicosam
05/05/2018, 8:23 PMnilan
05/05/2018, 8:23 PMprisma deploy doesn't do any schema interaction except if you explicitely set it up as a post deployment hookpicosam
05/05/2018, 8:24 PMpicosam
05/05/2018, 8:24 PMapi folder:
projects:
app:
schemaPath: "src/schema.graphql"
extensions:
endpoints:
default: "<http://localhost:4000>"
prisma:
schemaPath: "src/generated/prisma.graphqls"
extensions:
prisma: ../prisma/prisma.yml
prepare-binding:
output: src/generated/prisma.ts
generator: prisma-tspicosam
05/05/2018, 8:25 PMprisma folder next to itnilan
05/05/2018, 8:25 PMprisma.yml?picosam
05/05/2018, 8:25 PMendpoint: ${env:PRISMA_ENDPOINT}
secret: ${env:PRISMA_SECRET}
datamodel:
- types.graphqls
hooks:
post-deploy:
- graphql get-schema --project prisma
- graphql preparenilan
05/05/2018, 8:27 PMgraphql get-schema --project prisma directly from the CLI?picosam
05/05/2018, 8:27 PMapi folder?picosam
05/05/2018, 8:27 PMpicosam
05/05/2018, 8:27 PM→ graphql get-schema --project prisma
✖ Unsupported schema file extention. Only ".graphql" and ".json" are supportedpicosam
05/05/2018, 8:29 PMpicosam
05/05/2018, 8:30 PM.graphqls files — I guess it was for the WebStorm extensionnilan
05/06/2018, 3:46 PMnilan
05/06/2018, 3:46 PMcp src/generated/prisma.graphql src/generated/prisma.graphqls as another hook if you want to 🙂