Graphql-code-generator: Update programatic usage documentation

Created on 20 Mar 2019  路  6Comments  路  Source: dotansimha/graphql-code-generator

bug docs waiting-for-release

Most helpful comment

Thanks, I did parse(printSchema(schema)). Happy to put forward some edits of that page in a PR.

All 6 comments

Fix available in 1.0.2.

Hi, firstly many thanks for all your great work.

The schema type for the config in the programatic usage docs is required to be a DocumentNode by the referenced implementation, however in the example in the docs it's the result of buildSchema which returns a GraphQLSchema.

I couldn't find a way to negotiate these two types and derive a DocumentNode from my GraphQLSchema. Any advice much appreciated.

@dimitar-nikovski my bad, just use printSchema over the GraphQLSchema you are getting from buildSchema. Or, you can use parse (from graphql).

Thanks, I did parse(printSchema(schema)). Happy to put forward some edits of that page in a PR.

@dimitar-nikovski go for it!

Was this page helpful?
0 / 5 - 0 ratings