You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello 👋 I'm using the graphql-parse-resolve-info package for a frontend project, which means it goes through a bundler (in my case that is Next.js). After upgrading my graphql version to 16.x I'm experiencing some weird errors that look like this:
Cannot use GraphQLScalarType "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.
Of course I checked that I don't have duplicate graphql versions. In fact I could track this issue down to a line in this package:
It looks like the issue is that getArgumentValues is not imported directly from graphql but rather from a sub-directory. I assume that is because it is only exposed since this commit: graphql/graphql-js@6871bad, which landed in version 16.4.0.
When I change this line to import directly from graphql, the error from above is gone. To be fair this is probably also caused by my bundler and using this package with a bundler is probably a niche use-case anyways.
Summary
Hello 👋 I'm using the
graphql-parse-resolve-info
package for a frontend project, which means it goes through a bundler (in my case that is Next.js). After upgrading mygraphql
version to16.x
I'm experiencing some weird errors that look like this:Of course I checked that I don't have duplicate
graphql
versions. In fact I could track this issue down to a line in this package:graphile-engine/packages/graphql-parse-resolve-info/src/index.ts
Line 20 in e2a8a7c
It looks like the issue is that
getArgumentValues
is not imported directly fromgraphql
but rather from a sub-directory. I assume that is because it is only exposed since this commit: graphql/graphql-js@6871bad, which landed in version16.4.0
.When I change this line to import directly from
graphql
, the error from above is gone. To be fair this is probably also caused by my bundler and using this package with a bundler is probably a niche use-case anyways.Additional context
Relevant package versions:
[email protected]
[email protected]
[email protected]
The text was updated successfully, but these errors were encountered: