Open mjbcopland opened 4 years ago
The current behaviour of the codegen is to ignore fields that starts with __
because they are usually GraphQL internals.
I wasn't sure if it possible to extend those. Do you have a spec/issue related to it? because it seems like this error is coming from GraphQL validation method and not from the codegen.
This is related to my previous issue #3459. Codegen does ignore meta fields, except for the function isUsingTypes used by the import-types and near-operation-file presets. I opened an issue and a PR (#3460) around this and both were closed on the basis that I should add meta fields to the schema myself.
This issue is to document/track that doing so results in a GraphQL validation error as you mentioned, and hopefully reopen the discussion on my previous issue.
Describe the bug As described in https://github.com/dotansimha/graphql-code-generator/issues/2911#issuecomment-561019738 and https://github.com/dotansimha/graphql-code-generator/issues/3459#issuecomment-583487477, we're supposed to add meta types and fields to the schema ourselves for use with codegen. However that doesn't work as the schema fails validation:
To Reproduce Steps to reproduce the behavior:
codegen.yml
config file:Expected behavior
Types successfully generated for the meta query.
Environment: