-
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
2.12.3: Error: Cannot use GraphQLSchema "[object GraphQLSchema]" from another module or realm #1296
Comments
This seems to be caused by changing required dependency in apollo package from Which is caused by: #1291 |
Even tough I've downgraded it does not fix anything for me :/
If this complete list could signifie somethinkg to you ? |
If you are using npm:
|
I changed my backend's folder structure around and started getting this error while using serverless-offline and refreshing the local version of my UI. The fix for me was to change this line in my webpack config
to
This fix probably doesn't apply to you if you are using a standard folder structure. I don't even know why this worked. |
@flippidippi dedupe can't work if we are in a monorepo submodule whith a local import as those imports will not have anything left in there node modules |
In case anyone has a variable version like this
|
@Sceat did you made it work for you in monorepo ? |
Nop it's not possible, neither to |
have you tried to use |
Yup, and all sort of others things like burning sand in a cup shouting chinese words but no success.. |
@Sceat well, it works for me now with |
Would you mind sharing more about your 'resolutions' fix if possible? I'm not too sure how to set it up correctly. Thanks |
This is not a fix as it doesn't work lol, i don't even remember exactly but it's like putting graphql with a precise version in the I made my own tools |
To onlookers facing a similar problem, I ended up adding yarn resolutions to the base package.json in my yarn workspaces monorepo, specifying a version of GraphQL that previously worked fine. '"resolutions": { This fully resolved the duplicate GraphQL dependency error above. |
@xsats Downgrading the version is not viable |
Ok, just mentioning here as it is an appropriate fix for our particular scenario |
Just to add on here, I was able to do what @xsats did, but using "graphql": "^15.0.0". There was no need to downgrade the version. All I did was
|
I got this exact error when my .npmrc did not have proper entries such as username and password. We are using jFrog to normalise package installation and .npmrc should be located at root. Hope this will help someone |
I had a similar problem when using the apollo-link-schema package. You should just replace your modules with @apollo/client... https://www.apollographql.com/docs/react/migrating/apollo-client-3-migration/ . For example, apollo-link-schema is now @apollo/client/link/schema, etc. |
I am unable to understand where this error comes from... My command: The error:
My graphql dependencies:
All use graphql@15.8.0 except some sub-dependencies of |
This still seems to be an issue, should we re-open? |
@amritk This is still an issue for me as well. |
After upgrading from
apollo@2.12.2
-->apollo@2.12.3
, I started receiving the following error while trying to download my schema:Downgrading back to
2.12.2
causes the error to go away.The text was updated successfully, but these errors were encountered: