typescript-react-apollo used together with typescript-graphql-request generate conflicting imports
#9566
Unanswered
wujekbogdan
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.
-
Here's my config:
And here's the import section of the generated file:
the
gqlmodule is imported twice, once by thetypescript-react-apolloand once by thetypescript-graphql-requestplugin. which leads toTS2300: Duplicate identifier 'gql'.compilation error.Is there any way to fix it?
Here are some solutions I found, but they're not super-elegant:
Workaround 1
Generate 2 files to avoid conflicts:
Workaround 2
Remove the conflicting line from the output code:
Beta Was this translation helpful? Give feedback.
All reactions