dotansimha / dotansimha/graphql-code-generator
@graphql-codegen/cli @whatwg-node/fetch v0.6.3 doesn't support github schema
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Which packages are impacted by your issue?
_No response_
### Describe the bug
After we upgraded CLI version to `3.0.0` , our codegen no longer works. We are using the github integration as described here https://the-guild.dev/graphql/codegen/docs/config-reference/schema-field#github
When I investigated the issue, it is caused by the underlying library `@whatwg-node/fetch` upgrade from v0.6.2 to v0.6.3 .
When I add resolution to the older version, it works.
### Your Example Website or App
https://codesandbox.io/p/sandbox/codegen-error-demo-mcyebm
### Steps to Reproduce the Bug or Issue
1. Go to example app
2. Run `yarn start`
3. Code generation throws error
4. Add `"@whatwg-node/fetch": "0.6.2"` in package.json resolutions
5. run `yarn install`
6. run `yarn start`
7. Code is generated
### Expected behavior
Code is generated without resolution to the old version.
### Screenshots or Videos

### Platform
- OS: any
- NodeJS: 6.17.01
- `graphql` version: 16.6.0
- `@graphql-codegen/*` version(s): 3.0.0
### Codegen Config File
config:
token: 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
rawRequest: true
defaultScalarType: unknown
overwrite: true
generates:
types.ts:
schema: github:marmelab/GraphQL-example#master:schema.graphql
documents:
- "document.graphql"
plugins:
- typescript
- typescript-operations
- typescript-graphql-request
### Additional context
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.