-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Client preset generates duplicate fragments definitions #8842
Comments
I have the same Problem, resulting in nextjs outputing the generated Definition files in the Server Console, with a Error that my Fragment is defined twice in the generated Typescript file. |
Same for me, identical config file. |
I managed to make it work, by deleting the preset: "client" line in the Config File. However I have the following plugins:
|
Same for me. Tried a similar config to @Julhol-droid's but that no longer auto-includes fragments. Looking at the generated Any idea how to fix this short of just dropping fragment auto-import altogether? |
Hey everyone, we are aware of this issue and we will tackle this issue next week! |
Hey everyone, I created #8971 for resolving this once and for all. You can already start using the canary versions of the PR and provide feedback here. |
Which packages are impacted by your issue?
@graphql-codegen/client-preset^1.2.6
Describe the bug
Using these definitions
the client preset generates a
GetFoo
document that contains theCommonFragment
twice, which causes most servers to reject the requestYour Example Website or App
graphql-code-generator-issue-8842
Steps to Reproduce the Bug or Issue
npm i && npm run dev
Expected behavior
Document should not contain duplicate fragments
Screenshots or Videos
Platform
Codegen Config File
The text was updated successfully, but these errors were encountered: