How to refetch all dependent queries #2612
Answered
by
TkDodo
theelbowclaps
asked this question in
Q&A
-
I'm not sure if this is even the "React Query" way of doing things, but let's say:
CSB Example: https://codesandbox.io/s/loving-firefly-q2ent?file=/src/App.js If I want to refetch A to get the latest data, I actually need to refetch C, which triggers a refetch of B, and eventually A. |
Beta Was this translation helpful? Give feedback.
Answered by
TkDodo
Aug 29, 2021
Replies: 1 comment
-
have them start with the same query key and then use
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
theelbowclaps
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
have them start with the same query key and then use
queryClient.invalidateQueries
, like: