GraphQL Error
Error: Cannot use GraphQLObjectType "RoleConnection" 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 (/app/node_modules/parse-server/node_modules/graphql/jsutils/instanceOf.js:35:13)
at isObjectType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:122:34)
at isType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:92:32)
at isNullableType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:422:10)
at assertNullableType (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:426:8)
at new GraphQLNonNull (/app/node_modules/parse-server/node_modules/graphql/type/definition.js:379:19)
at Object.load (/app/node_modules/parse-server/lib/GraphQL/loaders/parseClassQueries.js:109:13)
at /app/node_modules/parse-server/lib/GraphQL/ParseGraphQLSchema.js:109:25
at Array.forEach (
Thanks for opening this issue!
- ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.
Can you please edit your post and use the issue template provided. We need the info from the template fields to investigate this.
@behnik it seems that you have 2 graphql versions into your project. If you do not have installed graphql, you can use Yarn resolutions to force all your packages to use the same graphql version: https://classic.yarnpkg.com/lang/en/docs/selective-version-resolutions/
I experienced the same error after upgrading Parse Server and Parse Dashboard to the latest version. It seems that each required their own GraphQL version.
I had no specific version constraints so I removed the package lock file, removed the dependencies from package.json and then added them back one by one. First I installed Parse Server and Parse Dashboard afterwards. This worked for parse-server v. 5.2.0 and parse-dashboard v. 4.1.0.
@mtrezza we should sync now last graphql version on parse-dashboard to resolve this issue
Duplicate "graphql" modules cannot be used at the same time since different versions may have different capabilities and behavior.
What are the compatibility requirements? Down to the exact same version? That sounds difficult to maintain. What's the solution here? Do we need to add a compatibility section for GraphQL to the README of both parse-server and parse-dashboard like we have for example for Node.js?