Multiple instances of graphql
See original GitHub issueIt seems the recent release of the 19th August 2022 upgraded graphql dependency to fix a security vulnerability, yet the @keystone-6/auth package did not and this now causes issues with build. To replicate⦠Upgrade keystone dependencies to the below as per recent release.
"@keystone-6/auth": "4.0.1",
"@keystone-6/core": "2.2.0",
"@keystone-6/document-renderer": "1.1.1",
"@keystone-6/fields-document": "4.1.0",
"@keystone-ui/fields": "7.1.1",
Try and run yarn. You will seeβ¦
Error: Cannot use GraphQLScalarType "{ name: "String", description: "The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.", specifiedByURL: undefined, serialize: [function serialize], parseValue: [function parseValue], parseLiteral: [function parseLiteral], extensions: {}, astNode: undefined, extensionASTNodes: [] }" 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.
at instanceOf (/Users/skin/Projects/activeProjects/0197_LL_SiteRebuild/lokalliving-stack/keystone6/node_modules/@keystone-6/core/node_modules/graphql/jsutils/instanceOf.js:35:13)
...
On inspection of the dependency tree we can see this is true.
βββ¬ @keystone-6/auth@4.0.1
β βββ graphql@15.8.0
βββ¬ @keystone-6/core@2.2.0
β βββ¬ @apollo/client@3.6.9
β β βββ¬ @graphql-typed-document-node/core@3.1.1
β β β βββ graphql@16.6.0 deduped
β β βββ¬ graphql-tag@2.12.6
β β β βββ graphql@16.6.0 deduped
β β βββ graphql@16.6.0
β βββ¬ @graphql-tools/schema@9.0.1
β β βββ¬ @graphql-tools/merge@8.3.3
β β β βββ graphql@16.6.0 deduped
β β βββ¬ @graphql-tools/utils@8.10.0
β β β βββ graphql@16.6.0 deduped
β β βββ graphql@16.6.0 deduped
β βββ¬ @graphql-ts/extend@0.4.1
β β βββ graphql@16.6.0 deduped
β βββ¬ @graphql-ts/schema@0.5.3
β β βββ graphql@16.6.0 deduped
β βββ¬ @types/apollo-upload-client@17.0.1
β β βββ graphql@16.6.0 deduped
β βββ¬ apollo-server-core@3.10.1
β β βββ¬ @apollo/utils.usagereporting@1.0.0
β β β βββ¬ @apollo/utils.dropunuseddefinitions@1.1.0
β β β β βββ graphql@16.6.0 deduped
β β β βββ¬ @apollo/utils.printwithreducedwhitespace@1.1.0
β β β β βββ graphql@16.6.0 deduped
β β β βββ¬ @apollo/utils.removealiases@1.0.0
β β β β βββ graphql@16.6.0 deduped
β β β βββ¬ @apollo/utils.sortast@1.1.0
β β β β βββ graphql@16.6.0 deduped
β β β βββ¬ @apollo/utils.stripsensitiveliterals@1.2.0
β β β β βββ graphql@16.6.0 deduped
β β β βββ graphql@16.6.0 deduped
β β βββ¬ @apollographql/apollo-tools@0.5.4
β β β βββ graphql@16.6.0 deduped
β β βββ¬ @graphql-tools/mock@8.7.3
β β β βββ graphql@16.6.0 deduped
β β βββ¬ @graphql-tools/schema@8.5.1
β β β βββ¬ @graphql-tools/merge@8.3.1
β β β β βββ graphql@16.6.0 deduped
β β β βββ¬ @graphql-tools/utils@8.9.0
β β β β βββ graphql@16.6.0 deduped
β β β βββ graphql@16.6.0 deduped
β β βββ¬ apollo-server-plugin-base@3.6.2
β β β βββ graphql@16.6.0 deduped
β β βββ graphql@16.6.0 deduped
β βββ¬ apollo-server-errors@3.3.1
β β βββ graphql@16.6.0 deduped
β βββ¬ apollo-server-express@3.10.1
β β βββ graphql@16.6.0 deduped
β βββ¬ apollo-server-types@3.6.2
β β βββ graphql@16.6.0 deduped
β βββ¬ apollo-upload-client@17.0.0
β β βββ graphql@16.6.0 deduped
β βββ¬ graphql-type-json@0.3.2
β β βββ graphql@16.6.0 deduped
β βββ¬ graphql-upload@15.0.2
β β βββ graphql@16.6.0 deduped
β βββ graphql@15.8.0
βββ¬ @keystone-6/fields-document@4.1.0
βββ graphql@15.8.0
This can be also confirmed by inspecting the source code packages/auth/package.json
It seems auth package missed the upgrade. This is actually a non issue for me as I have built my own Auth and Access extension based on the original so I not longer need the @keystone-6/auth package, yet others are going to experience this problem I believe.
Issue Analytics
- State:
- Created a year ago
- Reactions:10
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Should I have multiple GraphQL instances or just a single one?
https://stackoverflow.com/questions/54676109/should-i-have-multiple-graphql-instances-or-just-a-single-one.
Read more >When to use multiple endpoints in GraphQL - LogRocket Blog
Exposing multiple endpoints in GraphQL is not the same as implementing REST β every REST endpoint provides access to a predefined resource orΒ ......
Read more >Should I have multiple GraphQL instances or just a single one?
My company runs a microservice architecture that has 50+ services that are powered by a single GraphQL endpoint, which orchestrate the callsΒ ...
Read more >Multiple GraphQL Operations in a Request - Dgraph
GraphQL requests can contain one or more operations. Operations include query, mutation, or subscription.
Read more >Executing multiple queries concurrently
Multiple queries can be combined together, and executed as a single operation, ... For instance, the user's name field, with type String ,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, I was surprised by this error running
npx create-keystone-app
followed by npm commands. You can also workaround this issue via npm overrides:Iβm very happy to see all the dependency updates! Upgrading jest and other deps helped solve a lot of problems for me. I see that prisma@4 was merged, and Iβm looking forward to updating to graphql@16 too.
Unfortunately, thatβs not a viable option for me.
Oh yes! Waiting for
graphql@16
upgrade too π