You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently not clear when a previously ongoing fetch will be cancelled. Imperative methods that trigger refetches behave differently per default, like:
refetch returned from useQuery defaults cancelRefetch to false
invalidateQueries, refetchQueries and resetQueries default cancelRefetch to false
fetchNextPage and fetchPreviousPage returned from useInfiniteQuery default cancelRefetch to true
As discussed on Twitter, not cancelling a refetch when you explicitly call one of the above methods might lead to wrong data being displayed / getting out-of-sync with the backend. The safer approach would be to always cancel when the user explicitly requests a refetch with one of the above mentioned options.
Proposed solution
Set the cancelRefetch flag to true per default on all imperative actions that support it
Users can opt-out by setting it to false
The text was updated successfully, but these errors were encountered:
It is currently not clear when a previously ongoing fetch will be cancelled. Imperative methods that trigger refetches behave differently per default, like:
refetch returned from useQuery defaults cancelRefetch to false
invalidateQueries, refetchQueries and resetQueries default cancelRefetch to false
fetchNextPage and fetchPreviousPage returned from useInfiniteQuery default cancelRefetch to true
As discussed on Twitter, not cancelling a refetch when you explicitly call one of the above methods might lead to wrong data being displayed / getting out-of-sync with the backend. The safer approach would be to always cancel when the user explicitly requests a refetch with one of the above mentioned options.
Proposed solution
cancelRefetch
flag totrue
per default on all imperative actions that support itThe text was updated successfully, but these errors were encountered: