Skip to content

tyoescript-resolvers - Support customising mapper for List types #10350

@TastyPi

Description

@TastyPi

Is your feature request related to a problem? Please describe.

graphql-js supports AsyncIterables for array query resolvers graphql/graphql-js#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:

type ArrayField<T> = T[] | AsyncIterable<T>

(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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions