Disable all queries in the application #2437
-
Hello, I am using react-query for all API calls happening in an application. However, there are some cases that these API calls might fail, for example, the authentication of the user is no longer valid. Is it possible to catch that error and disable all queries that are in the application. Currently, I am using Best regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
make the authentication part of the queryKey, set it to |
Beta Was this translation helpful? Give feedback.
make the authentication part of the queryKey, set it to
null
if it is no longer valid and setenabled
tofalse
whenauthentication
isnull
:)