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
I'm setting up a global QueryCache and MutationCache in my application to achieve one thing: signing out the user when a specific error status is received. This includes calling an async function (namely deleteItemAsync from expo-secure-store).
As the onError callback on both QueryCache and MutationCache is a synchronous function, I'm questioning if I'm taking the right approach here. Is there a better way/place to make the async call? I assume it's a pretty common case during error handling.
Thanks in advance (and thank you for this amazing library)!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi everybody,
I'm setting up a global QueryCache and MutationCache in my application to achieve one thing: signing out the user when a specific error status is received. This includes calling an async function (namely
deleteItemAsync
from expo-secure-store).As the
onError
callback on both QueryCache and MutationCache is a synchronous function, I'm questioning if I'm taking the right approach here. Is there a better way/place to make the async call? I assume it's a pretty common case during error handling.Thanks in advance (and thank you for this amazing library)!
Beta Was this translation helpful? Give feedback.
All reactions