Closed cyberwombat closed 1 year ago
I think we still need a reproduction on a sandbox :)
I was afraid you'd say that :). Do you have a starter sandbox with the use of makeExecutableSchema
?
No we don't have any. It is just a javascript file with makeExecutableSchema
:)
I'm also getting this error
Maybe you have an older version because we don't have files with "mjs" extension anymore in the newer versions; https://unpkg.com/@graphql-tools/utils@8.12.0/package.json
Evidently yarn doesn't remove any code and just adds new versions on top of old one. Not sure what thats about. But I deleted my entire node modules and rebuild - there is indeed no longer an index.mjs
but problem persists. I am rather baffled. Basically using the GraphQLSchema
type from graphpl
package is not accepted by the schema executor saying its using a different GraphQLSchema
. The current patch as indicated in SO solutions "fixes" it but I haven't yet tracked what needs changing to load the esm module.
Also graphql-tools
npm package has been deprecated and will no longer receive updates. You should use scoped packages like @graphql-tools/schema
. Closing this issue now since no reproduction is provided and it is actually related to an older deprecated package/version.
Issue workflow progress
Progress of the issue based on the Contributor Workflow
In an ESM project there is a conflict with locally used
graphql
module (which will be in esm mode) and the use of@graphwl-tools/utils
which imports the CJS version ofgraphql
resulting in a multiple graphql modules error.This SO question and accepted answer illustrate the issue and solution.
To Reproduce In a pure esm project, use both
graphql-tools
(for ex I usemakeExecutableSchema
as well as directly use thegraphql
package.I can confirm the accepted SO solution works. I think something similar applied (in this case I am looking at the ctranspiled
@graphql-tols/utlls/index.mjs
file:I didn't provide a sandbox as my setup is quite complex to replicate but I think/hope issue is obvious.
Thanks