Import only needed types @graphql-codegen/typed-document-node #7440
Unanswered
esferadigital
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I am setting up @graphql-codegen/typed-document-node in my project.
Following this guide: https://www.graphql-code-generator.com/docs/guides/react#apollo-and-urql
My
codegen.yml
is pointing to .graphql documents for the queries I need, but the generated file includes all possible types in the schema. This is all right at the moment as the file should not impact the bundle too much.However, for proper documentation of only the used types, what would be the right configuration to make it import only types for the operations defined in the
documents
field.Beta Was this translation helpful? Give feedback.
All reactions