Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement request cancellation #205

Open
nathanielrindlaub opened this issue Mar 13, 2024 · 1 comment
Open

Implement request cancellation #205

nathanielrindlaub opened this issue Mar 13, 2024 · 1 comment

Comments

@nathanielrindlaub
Copy link
Member

graphql-request supports using AbortController to abort queries that are in-flight: https://github.com/jasonkuhrt/graphql-request/blob/HEAD/examples/request-cancellation.ts

This seems important, especially because users can toggle on/off filters quickly and each one triggers a new GetImages request (and now a separate and slower GetImagesCount request).

Figuring out how to store each controller instance in state might be challenging, though. It would be worth looking into whether Apollo-client or RTK Query supports aborting in-flight requests through their APIs.

Related: #196

@nathanielrindlaub
Copy link
Member Author

nathanielrindlaub commented Nov 22, 2024

Related: #213 and #208

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant