Open bmulholland opened 6 months ago
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
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: