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
At the beginning of the month, I created an application using @graphql-mesh/cli version 5.0.2. I used the following command to generate my code, and everything worked fine:
However, in this new project, I started receiving the following error:
✔ Parse Configuration
⚠ Generate outputs
❯ Generate to .hasura/generated.ts
✖
Failed to load schema from (here is my correct link):
unauthorized
GraphQLError: unauthorized
at createGraphQLError (/Users/adamsmichal/Projects/devticon/backend-rest/node_modules/@graphql-tools/utils/cjs/errors.js:31:12)
at /Users/adamsmichal/Projects/devticon/backend-rest/node_modules/@graphql-tools/wrap/cjs/introspect.js:12:102
at Array.map (<anonymous>)
at getSchemaFromIntrospection (/Users/adamsmichal/Projects/devticon/backend-rest/node_modules/@graphql-tools/wrap/cjs/introspect.js:12:58)
at /Users/adamsmichal/Projects/devticon/backend-rest/node_modules/@graphql-tools/wrap/cjs/introspect.js:35:32)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async UrlLoader.load (/Users/adamsmichal/Projects/devticon/backend-rest/node_modules/@graphql-tools/url-loader/cjs/index.js:221:29)
at async /Users/adamsmichal/Projects/devticon/backend-rest/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:14:39)
at async Promise.all (index 5)
at async loadFile (/Users/adamsmichal/Projects/devticon/backend-rest/node_modules/@graphql-tools/load/cjs/load-typedefs/load-file.js:12:9)
GraphQL Code Generator supports:
- ES Modules and CommonJS exports (export as default or named export "schema")
- Introspection JSON File
- URL of GraphQL endpoint
- Multiple files with type definitions (glob expression)
- String in config file
Try to use one of above options and run codegen again.
◼ Load GraphQL documents
◼ Generate
To test, I went back to the working project, deleted node_modules and package-lock.json, and then reinstalled the dependencies. Unfortunately, the same error started appearing in the previously working project as well.
This suggests that the issue might be related to deep dependencies that are now causing authorization issues after a fresh install.
Which packages are impacted by your issue?
@graphql-codegen/cli
Describe the bug
At the beginning of the month, I created an application using @graphql-mesh/cli version 5.0.2. I used the following command to generate my code, and everything worked fine:
Today, I started working on a very similar project, where I’m also using @graphql-mesh/cli in the exact same way:
However, in this new project, I started receiving the following error:
To test, I went back to the working project, deleted node_modules and package-lock.json, and then reinstalled the dependencies. Unfortunately, the same error started appearing in the previously working project as well.
This suggests that the issue might be related to deep dependencies that are now causing authorization issues after a fresh install.
Environment:
• @graphql-mesh/cli version: 5.0.2
• Node.js version: 21.5.0
• npm version: 10.2.4
Your Example Website or App
Private
Steps to Reproduce the Bug or Issue
It's hard for me to write how to reproduce the code because it doesn't work when I do it from scratch
Expected behavior
The code generation should work as it did originally without throwing unauthorized errors.
Screenshots or Videos
No response
Platform
@graphql-mesh/cli version: 5.0.2
Node.js version: 21.5.0
npm version: 10.2.4
Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: