apollographql / apollographql/apollo-tooling

confilct with graphql v 15 in ./node_modules/graphql and v 14 in ./node_modules/apollo-language-server/node_modules/graphql

Open
#2,440 5 comments 10 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3k
Forks
460
PR merge metrics
No merged PRs in 30d

Description

our package.json has dependency for

"graphql": "^15.5.0"
"apollo": "*"

which installs in version 14.7.0 in ./node_modules/apollo-language-server/node_modules/graphql
and version 15.5.2 in ./node_modules/graphql

cousing conflict when using npx apollo codegen:generate

"Cannot use GraphQLScalarType "ID" from another module or realm."

deleting ./node_modules/apollo-language-server/node_modules/graphql folder fixes the issue

I am wondering why is there different version when graphql is already installed in node_modules/graphql

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the conflict with `npx apollo codegen:generate` using the versions in package.json, then inspect `node_modules/graphql` and `node_modules/apollo-language-server/node_modules/graphql`. Done means the command no longer raises the cross-realm `GraphQLScalarType "ID"` error while preserving the reported dependencies.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, nodejs, typescript
Domain
cli, devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.