You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm migrating configuration from codegen and eslint to this config, but it's unclear what the mapping is.
For example:
ESLint defines the "operations" value. Is "documents" in graphql-config read as "operations" by graphql-eslint?
For codegen, the only mention is the "extensions" -- do I just drop my exact configuration from codegen into "extensions" and it works?
It mentions "Now GraphQL Code Generator can consume that data" -- does that mean I have to specify the config file manually with --config option of codegen?
The text was updated successfully, but these errors were encountered:
bmulholland
changed the title
Clarify integrated configuration for other tools
Docs: Clarify integrated configuration for other tools
Dec 9, 2023
Agreed that it would be helpful if this could be clarified. If I currently follow the example from the docs and nest my entire existing graphql-codegen config in extensions: { codegen: { ... } } as suggested on that page, I get the following error when running graphql-codegen-esm --config graphql.config.ts:
✖ Invalid Codegen Configuration!
Please make sure that your codegen config file contains the "generates" field, with a specification for the plugins you need.
It should looks like that:
schema:
- my-schema.graphql
generates:
my-file.ts:
- plugin1
- plugin2
- plugin3
◼ Generate outputs
It is unclear to me whether this is due to
Some wrong/missing CLI flag? (It seems like graphql-codegen doesn’t have a way to tell apart its own/specific config format, and the generic graphql-config format. Or is this done based on the file name only?)
I'm migrating configuration from codegen and eslint to this config, but it's unclear what the mapping is.
For example:
The text was updated successfully, but these errors were encountered: