dotansimha / dotansimha/graphql-code-generator
UrlLoader types should allow passing IntrospectionOptions
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Is your feature request related to a problem? Please describe.
The implementation of the UrlLoader supports passing IntrospectionOptions down to the `getIntrospectionOptions` function call:
https://github.com/dotansimha/graphql-code-generator/blob/4acf545ab88b0dadcfd779be977e34c08bfabaf5/packages/graphql-codegen-cli/src/load.ts#L41
https://github.com/ardatan/graphql-tools/blob/2e1c0b7454d2e37c1a1cde07ce2e6622b2b83582/packages/loaders/url/src/index.ts#L404
https://github.com/ardatan/graphql-tools/blob/2e1c0b7454d2e37c1a1cde07ce2e6622b2b83582/packages/wrap/src/introspect.ts#L70
E.g. you can write a config like this:
```js
schema: {
'': {
inputValueDeprecation: true,
},
},
```
And it will pass `inputValueDepecation` down correctly and support the `inputValueDeprecation` feature.
However, the TypeScript types do not accept this as an option:
https://github.com/dotansimha/graphql-code-generator/blob/4acf545ab88b0dadcfd779be977e34c08bfabaf5/packages/utils/plugins-helpers/src/types.ts#L82-L99
### Describe the solution you'd like
Should this type extend [`LoadFromUrlOptions`](https://github.com/ardatan/graphql-tools/blob/2e1c0b7454d2e37c1a1cde07ce2e6622b2b83582/packages/loaders/url/src/index.ts#L6) or [`IntrospectionOptions`](https://github.com/graphql/graphql-js/blob/9c90a23dd430ba7b9db3d566b084e9f66aded346/src/utilities/getIntrospectionQuery.ts#L5) perhaps?
### Describe alternatives you've considered
_No response_
### Is your feature request related to a problem? Please describe.
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.