-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
How do I cancel a fetchMore? #3360
Comments
I have a query getting data by category (
Problem is when changing category while fetching more at the last category
If I can stop/cancel the |
I don't think there is a way to cancel a fetchMore directly, but I think if you keep track of the canceled status, and just return the previous result, that would simulate it. However, a fix for fetchMore receiving the wrong variables (#2499) may cause cancelling to be unnecessary. Even if you send a new query before the old fetchMore resolves, it shouldn't overwrite the new query. Really, that fetchMore data is/should be still "valid" and could be cached for future queries. |
To help provide a more clear separation between feature requests / discussions and bugs, and to help clean up the feature request / discussion backlog, Apollo Client feature requests / discussions are now being managed under the https://github.com/apollographql/apollo-feature-requests repository. This feature request / discussion will be closed here, but anyone interested in migrating this issue to the new repository (to make sure it stays active), can click here to start the migration process. This manual migration process is intended to help identify which of the older feature requests are still considered to be of value to the community. Thanks! |
I have a
<Query>
component with afetchMore
. I need to cancel the fetchMore if it has been initiated when the Query is restarted in my component. How can I do this?thanks
The text was updated successfully, but these errors were encountered: