Gqlgen: Schema in multiple files

Created on 14 Jun 2018  路  3Comments  路  Source: 99designs/gqlgen

Is there a way to have the schema spread out in multiple files? In large code bases having one large file might become difficult to maintain.

Most helpful comment

run the script before your build process (maybe using go generate or Makefile)

schema.sh

for f in ./graphql/schema/*.gql; do cat $f; echo; done > ./graphql/schema_generated.gql

image

All 3 comments

run the script before your build process (maybe using go generate or Makefile)

schema.sh

for f in ./graphql/schema/*.gql; do cat $f; echo; done > ./graphql/schema_generated.gql

image

I'm hoping to add support for graphql-import syntax into the new parser (until something lands in a spec).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sumanthakannantha picture sumanthakannantha  路  3Comments

steebchen picture steebchen  路  3Comments

andrewmunro picture andrewmunro  路  4Comments

jwatte picture jwatte  路  4Comments

msmedes picture msmedes  路  4Comments