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
I'm trying to build the generated SDK as a separate package (in the future also adding resolvers, etc).
What is the recommended way of building and distributing the generated SDK ?
I've tried a few things so far but I'm hitting a couple of roadblocks.
E.g. when having "type": "module" in my package.json file and running graphclient build I get introspection errors when generating the schema Failed to generate the schema Error: Failed to fetch introspection from xxxxx: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
If I remove "type": "module" I can build the graphclient and compile the typescript, but when I then try to use the package in a separete codebase I get Module not found: Can't resolve '@graphql-mesh/utils' at runtime.
If I build as CJS using graphclient build --fileType js and import that in my other repo, I also get Can't resolve '@graphql-mesh/utils'
Any advice is much appreciated !
The text was updated successfully, but these errors were encountered:
Hi,
I'm trying to build the generated SDK as a separate package (in the future also adding resolvers, etc).
What is the recommended way of building and distributing the generated SDK ?
I've tried a few things so far but I'm hitting a couple of roadblocks.
E.g. when having
"type": "module"
in mypackage.json
file and runninggraphclient build
I get introspection errors when generating the schemaFailed to generate the schema Error: Failed to fetch introspection from xxxxx: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
If I remove
"type": "module"
I can build the graphclient and compile the typescript, but when I then try to use the package in a separete codebase I getModule not found: Can't resolve '@graphql-mesh/utils'
at runtime.If I build as CJS using
graphclient build --fileType js
and import that in my other repo, I also getCan't resolve '@graphql-mesh/utils'
Any advice is much appreciated !
The text was updated successfully, but these errors were encountered: