Although graphql-tools _1.2.1_ seems to work with graphql _0.11.1_, I get the following warning:
warning "[email protected]" has incorrect peer dependency "graphql@^0.8.0 || ^0.9.0 || ^0.10.0".
It would be convenient to release a new version of graphql-tools that is verified compatible with graphql _0.11.x_.
This also creates an error when used with graphql-server and updated to 0.11.x since it creates 2 versions of graphql package.
Error: Schema must be an instance of GraphQLSchema. Also ensure that there are not multiple versions of GraphQL installed in your node_modules directory.
@VladShcherbin, have you solved that issue? I am stuck right now on that error.
@russelmahmud currently I'm using 0.10.5 until this is fixed.
@VladShcherbin, hey i'm also using same version for graphql, but still i am getting that error. In my project i have following packages installed
node_modules/@types/graphql -- version (0.10.2)
node_modules/graphql -- version (0.10.5)
node_modules/graphql-tools/node_modules/@types/graphql --version (0.9.4)
@russelmahmud this is strange, setting graphql package to 0.10.5 fixes this for me.
Try to remove node_modules directory and reinstall packages (or remove and add packages again), maybe it'll help.
I have tried few times, still no luck.
@VladShcherbin, i have solved it. it was totally different issue, i was mixing CommonJs - require with ES6 - import/export
In my case since after mongoose initalization, i had to import schema in the middle, i couldn't use import as it raises exception SyntaxError: 'import' and 'export' may only appear at the top level, that's why i had to mix commonJS and ES6.
I also need features from graphql 0.11.x and I got the same problem.
kambing86 seems to have fixed the issue in the pull request "Update package.json" #395.
When does the PR will be merged into the master and released ?
See also this: https://github.com/apollographql/graphql-subscriptions/issues/100
Using devDependencies is sufficient. (currently optional)
just ran into this issue trying to upgrade my version of graphql to 0.11.x ... yarn still installs 0.10.5 into node_modules/graphql-tools/node_modules/graphql and the 2 versions are incompatible, causing calls to graphql() to fail
Fixed in #395, thanks!
Most helpful comment
This also creates an error when used with graphql-server and updated to 0.11.x since it creates 2 versions of graphql package.