Skip to content
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

Upgrade graphql dependency to 0.11.x #394

Closed
lpellegr opened this issue Aug 27, 2017 · 11 comments
Closed

Upgrade graphql dependency to 0.11.x #394

lpellegr opened this issue Aug 27, 2017 · 11 comments

Comments

@lpellegr
Copy link

Although graphql-tools 1.2.1 seems to work with graphql 0.11.1, I get the following warning:

warning "graphql-tools@1.2.1" 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.

@lpellegr lpellegr changed the title Upgrade to graphql dependency 0.11.x Upgrade graphql dependency to 0.11.x Aug 27, 2017
@vladshcherbin
Copy link
Contributor

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.

@russelmahmud
Copy link

@vladshcherbin, have you solved that issue? I am stuck right now on that error.

@vladshcherbin
Copy link
Contributor

vladshcherbin commented Aug 28, 2017

@russelmahmud currently I'm using 0.10.5 until this is fixed.

@russelmahmud
Copy link

russelmahmud commented Aug 28, 2017

@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)

@vladshcherbin
Copy link
Contributor

@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.

@russelmahmud
Copy link

I have tried few times, still no luck.

@russelmahmud
Copy link

@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.

@fredericnowak
Copy link

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 ?

@ribizli
Copy link

ribizli commented Sep 4, 2017

See also this: apollographql/graphql-subscriptions#100
Using devDependencies is sufficient. (currently optional)

@mattfysh
Copy link

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

@stubailo
Copy link
Contributor

stubailo commented Sep 22, 2017

Fixed in #395, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants