Replies: 1 comment 5 replies
-
yeah it should retry. I would need to see a minimal reproduction please |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I have a setup using the queryClient's defaultOptions.
The queries are set to retry and the mutations are expected to retry on a specific error.
This works in most cases as expected. However, there are cases where a useMutation call is followed by using invalidateQueries on a useQuery get request in order to trigger a refetch. This happens in both cases of the useMutation succeeding or failing.
My issue is, the useQuery call is not retrying on failures in this case when it should be. See network log below:
Where 1 is the failing mutation call (doesn't retry as expected)
And 2 is the failing get call triggered by the invalidate queries (doesn't retry, but should be)
I'm struggling to see anything at all in the documentation about this. Is invalidateQueries not designed to fire retries if it fails? How do I get it to apply the retry it does elsewhere, when the useQuery call is fired normally?
Beta Was this translation helpful? Give feedback.
All reactions