Update to graphql 0.13.0 crashes subscriptions
See original GitHub issueUpdate:
Add the following to your package.json
and run yarn install
. This should fix the problem:
"resolutions": {
"graphql": "0.13.1"
}
After updating to graphql-yoga to 1.2.5 subscriptions are not working anymore because of duplicated graphql version. And a lot of warnings are throwing on yarn installation -> i think that the deps are not compatible with 0.13.0
warning "graphql-yoga > apollo-upload-server@4.0.0-alpha.3" has incorrect peer dependency "graphql@0.11 - 0.12".
warning "graphql-yoga > graphql-subscriptions@0.5.6" has incorrect peer dependency "graphql@^0.10.5 || ^0.11.3 || ^0.12.0".
warning "graphql-yoga > graphql-tools@2.18.0" has incorrect peer dependency "graphql@^0.11.0 || ^0.12.0".
warning "graphql-yoga > subscriptions-transport-ws@0.9.5" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0".
warning "graphql-yoga > apollo-server-express > apollo-server-core@1.3.2" has incorrect peer dependency "graphql@^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0".
warning "graphql-yoga > apollo-server-express > apollo-server-core > apollo-cache-control@0.0.9" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0".
warning "graphql-yoga > apollo-server-express > apollo-server-core > apollo-tracing@0.1.3" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0".
warning "graphql-yoga > apollo-server-express > apollo-server-core > graphql-extensions@0.0.7" has incorrect peer dependency "graphql@^0.10.0 || ^0.11.0 || ^0.12.0".
Cannot use GraphQLSchema “[object Object]” from another module or realm.↵↵Ensure that there is only one instance of “graphql” in the node_modules↵directory. If different versions of “graphql” are the dependencies of other↵relied on modules, use “resolutions” to ensure only one version is installed.↵↵https://yarnpkg.com/en/docs/selective-version-resolutions↵↵Duplicate “graphql” modules cannot be used at the same time since different↵versions may have different capabilities and behavior. The data from one↵version used in the function from another could produce confusing and↵spurious results.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:23 (7 by maintainers)
Top GitHub Comments
For everyone still having problems with this, please try the following things if the error still appears:
yarn upgrade-interactive --latest
and make sure you’re running the newest version of the following packages (if used)prisma-binding
graphql-yoga
prisma
graphql-cli
rm -rf node_modules
yarn install
This issue is still happening for me with
yarn
version1.6.0
even with the resolutions fix.