Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearing query data-cache on error #1695

Closed
okansahin opened this issue Nov 5, 2021 · 1 comment
Closed

Clearing query data-cache on error #1695

okansahin opened this issue Nov 5, 2021 · 1 comment

Comments

@okansahin
Copy link

Hello,

I want to clear query results if returns error from server.

In my scenario:
User has logged in and gets previous order list by query in a component. Then user sign out but the order list still in cache. If I try to refetch gives me 401 and doesn't change data.

How can i clear specific queries directly? I tried invalidate with tag but it didn't helped me cause if returns 401 when trying to update is not affect.

And ideas?

Thank you

@okansahin
Copy link
Author

I solved this case by using custom base query

And there is a feature request that I think it may help in similar cases.

#1139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant