-
After a mutation is executed and succeeded, I invalidated a query that has a key related to the mutation as below.
In v4, after the invalidation of a specific query, regardless of how much time is set to the refetchInterval option of the query, invalidateQueries method lets us mark queries as stale and refetch them as well. However, in v5, despite I invalidated a specific query, it doesn't fetch the latest data or at least it's not reflected in UI. It'd be awesome to be made clear the reason for this change, as this behaviour in v5 or the latest version leads to unnecessary network round trips (return 304 status code)! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
that is still the case. note that only active queries are refetched immediately. that hasn't changed.
not sure what "other tab" means exactly. unless you have used the experimental note that there was a change to how refetchOnWindowFocus works in v5. maybe you've just seen a refetch on window focus before? |
Beta Was this translation helpful? Give feedback.
that is still the case. note that only active queries are refetched immediately. that hasn't changed.
not sure what "other tab" means exactly. unless you have used the experimental
broadcast-channel
plugin, browser tabs don't know about each other.note that there was a change to how refetchOnWindowFocus works in v5. maybe you've just seen a refetch on window focus before?