-
I'm trying to invalidate all my queries at once. I know that sounds weird, but the use case is that our APIs work with and without authorization, but you get user specific data when logged in. I tried According to the docs, the query key should be optional on both methods, but that's not the behavior I'm seeing. Is this invalidating all queries support? |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 10 replies
-
I think https://react-query.tanstack.com/reference/QueryCache#querycacheclear |
Beta Was this translation helpful? Give feedback.
-
Can you create a codesandbox? I think this should work... |
Beta Was this translation helpful? Give feedback.
-
query-invalidation This link helped me for this issue. |
Beta Was this translation helpful? Give feedback.
-
For all the lazy devs out there :)
does the magic |
Beta Was this translation helpful? Give feedback.
-
@obsd According to the documentation, https://tanstack.com/query/v4/docs/react/guides/query-invalidation |
Beta Was this translation helpful? Give feedback.
For all the lazy devs out there :)
does the magic