Describe the bug
As of 1.8.3 now get error when trying to introspect from url with env variables
✔ Parse configuration
❯ Generate outputs
❯ Generate ./packages/server/src/<thing>.ts
✖ Load GraphQL schemas
→ Failed to load schema
Load GraphQL documents
Generate
Found 1 error
✖ ./packages/server/src/<thing>.ts
Failed to load schema from [object Object]:
undefined
undefined
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.
Error: Failed to load schema
at Object.exports.loadSchema (<__dirname>/node_modules/@graphql-codegen/cli/dist/common
js/load.js:75:15)
Error: Failed to load schema
at Object.exports.loadSchema (<__dirname>/node_modules/@graphql-codegen/cli/dist/common
js/load.js:75:15)
To Reproduce
Steps to reproduce the behavior:
codegen.yml config file:schema:
- https://${PRIVATE_APP_DOMAIN}/admin/api/2019-10/graphql.json:
headers:
X-Shopify-Access-Token: ${PRIVATE_APP_PASSWORD}
# ...
Expected behavior
In <1.8.3 worked fine
Environment:
12.11Additional context
@qw-in Could you try with the following canary version?
1.8.4-alpha-40191ca5.21+40191ca5
@ardatan this fixed it for me, thanks :+1:
Let’s keep it open until we release a new version :)
Fixed in 1.9.0