dotansimha / dotansimha/graphql-code-generator
tyoescript-resolvers - Support customising mapper for List types
- 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.
`graphql-js` supports AsyncIterables for array query resolvers https://github.com/graphql/graphql-js/pull/2757
AFAICT, there is not a way to configure `graphql-codegen` to return AsyncIterables for array resolvers.
### Describe the solution you'd like
Either introduce something like an `ArrayField` type which supports everything `graphql-js` supports:
```ts
type ArrayField = T[] | AsyncIterable
```
(this might not be as generic as it could be, I haven't checked)
Or allow a way to define a mapper for arrays (maybe there is a way to do that already, I couldn't find any documentation for it).
### Describe alternatives you've considered
I could modify the generated code, or give up on codegen, or not use AsyncIterables.
### Any additional important details?
_No response_
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.