kosaka
06/10/2018, 3:00 PMprojects:
app:
schemaPath: src/schema.graphql
extensions:
endpoints:
default: '<http://localhost:4000>'
prepare-bundle: src/generated/app.graphql
codegen:
- generator: prisma-binding
language: typescript
output:
binding: src/generated/app.ts
prisma:
schemaPath: src/generated/prisma.graphql
extensions:
prisma: prisma/prisma.yml
codegen:
- generator: prisma-binding
language: typescript
output:
binding: src/generated/prisma.tsjon
06/11/2018, 10:50 AMgraphql codegen I get: TypeError: Cannot read property 'type' of undefined
- Where does src/generated/app.graphql come from? Is that generated by running graphql codegen?jon
06/11/2018, 10:52 AMnilan
06/11/2018, 1:08 PMjon
06/11/2018, 3:30 PMgraphql-yoga server.nilan
06/11/2018, 3:34 PMkosaka
06/11/2018, 4:34 PMWhat command do I need to run to generate TypeScript definitions using the above?There are 3 steps. 1. Run
graphql get-schema --project prisma to generate src/generated/prisma.graphql
2. Run graphql prepare to generate src/generated/app.graphql from src/schema.graphql
3. Run graphql codegen to generate src/generated/app.ts and src/generated/prisma.ts from src/generated/*.graphql files.kosaka
06/11/2018, 4:40 PMWhere does src/generated/app.graphql come from?It comes from
src/schema.graphql file which I configured. Please look up graphql-cli-prepare and graphql-import modules.
https://github.com/graphql-cli/graphql-cli-prepare#graphql-config-extensions
https://github.com/prismagraphql/graphql-importjon
06/14/2018, 8:12 AMgraphql prepare doesn’t seem to output anything at all. The contents of my .graphqlconfig.yml is here: https://gist.github.com/jonlambert/e8db2819d30bacf65d4064d90ab50f6akosaka
06/14/2018, 9:58 AMkosaka
06/14/2018, 10:18 AMjon
06/14/2018, 2:19 PMjon
06/14/2018, 2:19 PMTypeError: Cannot read property 'type' of undefinedjon
06/14/2018, 2:24 PMkosaka
06/14/2018, 6:25 PMschema.graphql is not correct.kosaka
06/14/2018, 6:28 PMkosaka
06/14/2018, 6:29 PM