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

Cannot use GraphQLNonNull "String!" from another module or realm. #7894

Open
DanielAtCosmicDNA opened this issue Jul 2, 2024 · 1 comment

Comments

@DanielAtCosmicDNA
Copy link

Issue Description

When you run the canonical code from: https://github.com/CosmicDNA/neo4j-graphql-example-nextjs/tree/5385e091ce68004de94bda184c940e69a09c7dee,

with yarn run dev and go to /api/graphql path, the following error is thrown:

 ⨯ Error: Cannot use GraphQLNonNull "String!" 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.

More details on: apollo-server-integrations/apollo-server-integration-next#200

Link to Reproduction

https://github.com/CosmicDNA/neo4j-graphql-example-nextjs/tree/5385e091ce68004de94bda184c940e69a09c7dee

Reproduction Steps

Cloning

To clone the repository run:

git clone https://github.com/CosmicDNA/neo4j-graphql-example-nextjs.git

Installation

To install the dependencies run:

cd neo4j-graphql-example-nextjs
npm install

Setting database

To set the database up, rename .env.sample to .env and edit the parameters of your Neo4j database accordingly.

Starting the GraphQL server

Finally, to start the Apollo GraphQL server run:

npm run dev
@DanielAtCosmicDNA
Copy link
Author

I was able to workaround for the time being with apollo-server-integrations/apollo-server-integration-next#200 (comment).

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

1 participant