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

Question: How can I abort a query already in progress? #212

Open
Dastari opened this issue Aug 29, 2019 · 1 comment
Open

Question: How can I abort a query already in progress? #212

Dastari opened this issue Aug 29, 2019 · 1 comment

Comments

@Dastari
Copy link

Dastari commented Aug 29, 2019

Is there any way to abort a useQuery that is in progress?

I have a map that queries data based on the bounding coordinates of the current window. Data fetch times can be a few seconds but if the user rapidly moves around I want to be able to cancel the last request made in favor of the new query.

I do use throttling and checking the loading state of the useQuery however this just prevents new queries being executed concurrently. This is fine but it leaves me with waiting for data from the original useQuery to finish before I can do anything else.

@hcharley
Copy link

@Dastari as I just moved away from this package, figured I'd give you a heads up that this package is now deprecated. You will probably get an answer on this sooner over at https://github.com/apollographql/react-apollo

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

No branches or pull requests

2 participants