How to use invalidate queries to refetch queries. #2550
Replies: 3 comments
-
any progress on this? |
Beta Was this translation helpful? Give feedback.
-
I found out that you can invalidate/refetch queries passing just a simple string instead of array to import { useQueryClient } from "wagmi";
const queryClient = useQueryClient();
// Invalidate/refetch a specific query by its key
queryClient.resetQueries({ queryKey: "balanceOf" as never }); Please note, it's important to correctly set the |
Beta Was this translation helpful? Give feedback.
-
Have a look at the documentation I hope that helps |
Beta Was this translation helpful? Give feedback.
-
I asked this question on Stackoverflow but didn't get any answer so far so I came here. I want to use invalidate queries to refetch Wagmi's query functions. After all, it uses react-query under the hood. So what is the query key on below function:
functionName, scopeKey, or something else?
Beta Was this translation helpful? Give feedback.
All reactions