-
Notifications
You must be signed in to change notification settings - Fork 470
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
Both graphql@14 and graphql@15 are installed when installing apollo. (e.g., apollo client:codegen command doesn't work properly when you run it as a script.) #2232
Comments
I fixed the bug in my project. Apparently, it happened because I installed apollo both in my project & globally. I did some experiments and this was the result.
Maybe it only happens to some computers? I can't be sure. |
I am having the same problem.
The issue seems to be caused by
|
These packages all link to non existing github repositories and were not updated in 2 years. |
According to #1553 (comment) these packages are forks from https://github.com/graphql/graphiql/tree/main/packages. The original packages support graphql@15 by now so I think it would be helpful if an apollographql member could take a look at the original packages and update the packages under the @apollographql namespace accordingly. |
By the way this is not an issue with installing apollo globally, this issue also occurs locally on my installation. The issue is that |
Installing apollo in an empty project (node v15.12.0, npm 7.6.3) resulted in the following dependency tree for me (calling Installing graphql@15 fails because not all peer dependencies can be satisfied: Using the I don't know how I managed to get both |
I don't know why but I can't convince npm in my other project to use |
Thanks for logging this issue! We should probably get away from using the packages under the
Anyone experiencing this problem willing to to checkout this branch and see if they can reason their way through what appear to be largely TypeScript warnings? I'd suggest reverting both of the commits that I'd noted with |
how to fix this |
Hey guys, if you are still experiencing this issue where there are multiple GraphQL versions installed and specifically the GraphQL 14.7 from
I hope this helps. |
upgrade npm for using overrides modify graphql version "graphql": "^15.8.0" and add below in package.json |
@de1eb Brilliant! Works like a charm! |
project environment: create-react-app with typescript template
dev environment: windows10, wsl2, node(14.16.0 ver), npm(7.5.6 ver)
When I run [apollo client:codegen src/generated_api_types --target=typescript --outputFlat], it works fine. All the interfaces are generated perfectly.
But if I run the same command as [npm run apollo:codegen], it doesn't work.
The same problem arises if remove the --outputFlat option, so I guess that's not the cause.
Also, I found another person with the same issue online. Can someone help me how to fix it?
The text was updated successfully, but these errors were encountered: