Open edwinvelez opened 3 years ago
The problem here is the apollo
cli package, which is not in a very good state. At the moment the apollo
package has some dependencies which are not compatible with graphql >=15, and other dependencies which are not compatible with graphql <=14. It looks like maintenance on this package has slowed down a lot. I personally recommend you try GraphQL Code Generator instead of the apollo cli.
See more here:
https://github.com/apollographql/apollo-tooling/issues/2415
https://github.com/apollographql/apollo-tooling/issues/2232
Hey @dylanwulf.
I was wondering if I would ever get a reply to this. But only yesterday, when on my phone via the GitHub app, did I accidentally close and then reopen this issue. Looks like doing so put this back in view.
Anyways, I was not aware of the maintenance as you described but thank you for the info. And yes.......GraphQL Code Generator seems to be a much better solution. Thanks for your reply and guidance.
Also got this problem at the moment. Still no fixes for that?
Intended outcome: Connect to and generate schema from GitHub.
Actual outcome: Dependency conflicts shown in error reproduction errors.
How to reproduce the issue: Working on a new Next.js project and get an error:
Error: Cannot use GraphQLNonNull "String!" from another module or realm.
There appears to be a solution in the way
npm
packages are installed. Below are the steps to reproduce the issue and apparently solve the problem.Steps to Reproduce: ERROR NO: 1
apollo.config.js
apollo
Resulting
package.json
fileResulting Error:
Steps to Reproduce: ERROR NO: 2
apollo.config.js
continues to exist.apollo
Resulting
package.json
file.graphql DIFFERENCE!!
First attempt version install is
^15.6.0
and second attempt is^14.7.0
Resulting Error
Solution to Correct Problem
Change the order of package installation.
apollo
NOTICE:
graphql
is installed with@latest
which is VERY IMPORTANT! But you will still get an warnings!!Resulting Output
SUCCESS!!!
Versions