-
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
Fragment imports broken in latest update #9293
Comments
Have this error: |
Thanks for addressing this issues @wassim-k since it's merged, I've tested all the alpha versions of my
FWIW I tried with the yarn resolutions to force |
Hi @Tbaut, I just tested it with the package.json below and it's working with the correct fragment imports. Not sure if there are other changes made to other packages that are causing the issue you're seeing.
|
Facing the same issue. Tried to used exactly the same plackages as described in
But doesn't solve the issue, getting the exact same as
The generated import { ResultOf, DocumentTypeDecoration, } from '@graphql-typed-document-node/core'; Which breaks the fragments. |
I don't believe this issue is related, but I tried to create a reproduction with the above config and I can't seem to replicate it, can you please let me know if I missed something: https://stackblitz.com/edit/graphql-codegen-fragment-issue-dzbqch |
Stackblitz uses Turbo instead of NPM. The reason you can't reproduce might be because in your project Try this to make sure the transitive dependency is updated if you have the issue that "overrides": {
"@graphql-typed-document-node/core": "3.2.0"
} |
This issue is still happening with the latest release, however using yarn resolutions and adding what @cideM suggested worked
|
Which packages are impacted by your issue?
@graphql-codegen/typed-document-node
Describe the bug
In the most recet update of
@graphql-codegen/visitor-plugin-common v3.1.0
when usingtyped-document-node
plugin withnear-operation-file-preset
then fragment imports from other files are missing as shown in the minial production.Your Example Website or App
https://stackblitz.com/edit/graphql-codegen-fragment-issue?file=src/user.query.ts
Steps to Reproduce the Bug or Issue
yarn
thenyarn codegen
in the minial reproduction and navigate tosrc/user.query.ts
fileExpected behavior
UserFragmentDoc
import should be defined at the top ofuser.query.ts
file.Screenshots or Videos
No response
Platform
graphql
version: 16.6.0Codegen Config File
Additional context
No response
The text was updated successfully, but these errors were encountered: