dotansimha / dotansimha/graphql-code-generator-community

typescript-graphql-request still uses removed Dom type when rawRequest option is true

Open
#374 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
137
Forks
195
Avg merge
6h 20m
Merged PRs (30d)
16

Description

### Which packages are impacted by your issue?

@graphql-codegen/typescript-graphql-request

### Describe the bug

typescript-graphql-request still uses removed `Dom` type when `rawRequest` option is true

### Your Example Website or App

https://stackblitz.com/edit/github-ymky4r?file=types.ts

### Steps to Reproduce the Bug or Issue

Please check the `type.ts` in repro.
You will see `Dom.Headers` is still there.

### Expected behavior

According to graphql-request's code definition, [`GraphQLClientResponse.headers` is `Headers` type](https://github.com/jasonkuhrt/graphql-request/blob/main/src/types.ts#L86), we should do the same.

### Screenshots or Videos

_No response_

### Platform

- OS: [ubuntu, macOS]
- NodeJS: [16.20.0]
- `graphql` version: [16.2.0]
- `@graphql-codegen/typescript-graphql-request` version(s): [5.0.0]

### Codegen Config File

```javascript
import { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
schema: 'schema.graphql',
documents: 'document.graphql',
generates: {
'types.ts': {
plugins: [
'typescript',
'typescript-operations',
'typescript-graphql-request',
],
config: {
rawRequest: true,
},
},
},
};

export default config;
```

### Additional context

related: #331, #335

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.