next-graphql
next-graphql copied to clipboard
Issues with having local graphql package installed
This arose around having a peer requirement for gqty. We want to just integrate gqty as the client so we should be able to knock this out at the same time.
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/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/node_modules/@graphql-tools/utils/node_modules/graphql/jsutils/instanceOf.js:41:19)
at Object.isObjectType (/Users/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/node_modules/@graphql-tools/utils/node_modules/graphql/type/definition.js:129:37)
at mapArguments (/Users/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/node_modules/@graphql-tools/utils/index.js:2549:26)
at mapDefaultValues (/Users/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/node_modules/@graphql-tools/utils/index.js:2438:24)
at Object.mapSchema (/Users/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/node_modules/@graphql-tools/utils/index.js:2368:96)
at /Users/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/index.js:1352:15
at /Users/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/index.js:1705:124
at Array.flatMap (<anonymous>)
at /Users/ian/Projects/project/node_modules/next-graphql/node_modules/@graphql-tools/stitch/index.js:1705:104
at Array.reduce (<anonymous>) {
page: '/api/graphql'
}
[GQtyError: invalid json response body at http://localhost:3000/api/graphql reason: Unexpected token < in JSON at position 0] {
type: 'invalid-json'
}
error - Error: Cannot use GraphQLObjectType "Attribute" from another module or real