Skip to content

@graphql-codegen/cli @whatwg-node/fetch v0.6.3 doesn't support github schema #9007

@aliosmanisikk

Description

@aliosmanisikk

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

image

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions