graphql-code-generator
graphql-code-generator copied to clipboard
[typescript-graphql-request] Allow passing Abortsignal to sdk methods
Is your feature request related to a problem? Please describe.
Currently, it's not possible to pass an Abortsignal
to the sdk methods generated by the typescript-graphql-request
plugin.
Describe the solution you'd like
Replacing the positional argument call with single argument, described in the new graphql-request usage
Describe alternatives you've considered
Graphql-request
currently does not allow passing an Abortsignal
any other way.
Additional context
Although there is a react-query graphql codegen plugin we started using the graphql-request
plugin and create custom hooks based on react-query on our own to have more control over the custom hooks. We now want to leverage the signal passed to each fetcher function of react-query
in graphql-request
.