Repository navigation
Can graphql-codegen-client-preset eliminate unused generated documents across apps in a monorepo? #531
Replies: 1 comment
|
This is not a correct place to ask |
0 replies
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.
Hi! 👋
I’m working with a Turborepo monorepo that contains:
Two separate apps (Next.js + Angular)
One shared package for reusable GraphQL operations (queries, mutations, fragments, etc.)
My issue: when I build one app, the generated gql.ts file includes all operations from both apps, even though only a subset is actually used.
For example, the generated output looks like this:
In this case, Login is only used in the second app, but it still shows up when building the first app.
👉 My question: Is graphql-codegen-client-preset capable of tree-shaking or eliminating unused documents automatically?
All reactions