-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fetchMore doesn't trigger callback on graphql/network error #6857
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
Comments
I can confirm that this is reproducible on |
If someone can provide a small runnable reproduction that demonstrates this happening with |
@hwillson Here is my reproduction (use branch If the error policy is I think part of the problem here is that the documentation is very unclear. When |
I can confirm that this is reproducible on |
Still happening |
Confirm the problem |
In my case, I am merging the previous and the new results. I had to throw the error first from within
|
Linking in this issue for anyone that ends up here, #12352 |
Intended outcome:
When an error occurs while using
fetchMore
to get the next page (either response witherrors
or network error), the query should be notified of it when usingerrorPolicy: 'all'
.Actual outcome:
GQL Request failed and the watch callback was not called.
How to reproduce the issue:
My case: Use relay pagination, have a query which uses
{ fetchPolicy: 'cache-and-network', nextFetchPolicy: 'cache-first', errorPolicy: 'all' }
, have a callback which handleserrors
property. Load initial page, then either have invalidafter
cursor value in fetchMore to have grapql endpoint fail when parsing it, or go offline. Then try to load the next page.Versions
The text was updated successfully, but these errors were encountered: