Describe the bug
To Reproduce
Steps to reproduce the behavior:
type Foo {
id: ID!
}
type Query {
foo: Foo!
}
query test {
foo {
id
}
}
codegen.yml config file:schema: ./schema.gql
documents: ./src/**/*.gql
overwrite: true
generates:
./src/index.ts:
plugins:
- typescript
- typescript-operations
- typescript-graphql-request
config:
rawRequest: false
skipTypename: true
namingConvention:
transformUnderscore: true
Expected behavior
Generate TypeScript code without any errors.
Environment:
@graphql-codegen/...: {
"@graphql-codegen/cli": "^1.20.0",
"@graphql-codegen/introspection": "^1.18.1",
"@graphql-codegen/typescript": "^1.20.0",
"@graphql-codegen/typescript-operations": "^1.17.13",
"@graphql-codegen/typescript-graphql-request": "^3.0.0",
"graphql": "^15.4.0"
}
Additional context
I think it is related to #4793 because it import Headers when rawRequest: true but not by default or rawRequest: false.
Fixed, and it will be available in the next release (very soon!)
Fixed in @graphql-codegen/[email protected].
@dotansimha The fix actually created another problem which I reported in #5459
Most helpful comment
@dotansimha The fix actually created another problem which I reported in #5459