-
Notifications
You must be signed in to change notification settings - Fork 558
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attach AbortSignal to context by default 馃 #2207
Comments
This would be awesome 馃憤 I think I can provide some useful input on which capabilities would be nice since I'm currently setting working with AbortSignals in our Fastify/Yoga/GraphQL/MongoDB environment. Our use case is working with large datasets we sometimes trigger really slow queries, and as such want to cancel all requests (including database requests) after a certain timeout to clear up resources. Aborting on "client closed" is also nice but in our case not the main use case. As a whole I'd like a solution that supports these scenarios:
I'm thinking to keep things simple one option would for Yoga to initially just provide:
And maybe at a later stage provide a default AbortSignal implementation supporting the request timeout and client closed cases? What do you think? |
This would be handy for canceling ongoing stuff within GraphQL resolvers 馃
The text was updated successfully, but these errors were encountered: