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

Client continuously retries failed queries #6434

Closed
hboylan opened this issue Jun 12, 2020 · 2 comments
Closed

Client continuously retries failed queries #6434

hboylan opened this issue Jun 12, 2020 · 2 comments
Assignees
Milestone

Comments

@hboylan
Copy link

hboylan commented Jun 12, 2020

Intended outcome:
Failed queries should error once and not retry unless otherwise configured with RetryLink.

Actual outcome:
Failed queries continuously retry.

How to reproduce the issue:
Call a query with useQuery and add an invalid field. The network inspector shows many failed requests with the 400 status code.

Versions
@apollo/[email protected]
(and as far back into v3 beta as I can remember)

@benjamn benjamn added this to the Release 3.0 milestone Jun 16, 2020
@benjamn benjamn self-assigned this Jun 16, 2020
benjamn added a commit that referenced this issue Jun 16, 2020
Ever since the big refactoring in #6221 made the client more aggressive
about triggering network requests in response to incomplete cache data
(when using a cache-first FetchPolicy), folks testing the betas/RCs have
reported that feuding queries can end up triggering an endless loop of
unhelpful network requests.

This change does not solve the more general problem of queries competing
with each other to update the same data in incompatible ways (see #6372
for mitigation strategies), but I believe this commit will effectively put
a stop to most cases of endless network requests.

See my lengthy implementation comment for more details, since this is a
non-obvious solution to a very tricky problem.

Fixes #6307.
Fixes #6370.
Fixes #6434.
Fixes #6444.
@benjamn
Copy link
Member

benjamn commented Jun 16, 2020

Without a reproduction I can't be sure, but @apollo/[email protected] should fix the endless network request loop, thanks to #6448.

@yorch
Copy link

yorch commented Mar 2, 2021

@benjamn I'm seeing this behaviour in @apollo/[email protected]. When a GraphQL request returns a 503, we get an infinity loop of retries. Seems to be happening only with queries with polling.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants