We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7cc0c00 commit 7e33cf4Copy full SHA for 7e33cf4
apps/pyconkr/src/main.tsx
@@ -26,8 +26,13 @@ const queryClient = new QueryClient({
26
},
27
28
mutationCache: new MutationCache({
29
+ onMutate: (_variables, mutation) => {
30
+ queryClient.resetQueries({
31
+ predicate: (query) => mutation.meta?.invalidates?.some((queryKey) => matchQuery({ queryKey }, query)) ?? true,
32
+ });
33
+ },
34
onSuccess: (_data, _variables, _context, mutation) => {
- queryClient.invalidateQueries({
35
36
predicate: (query) => mutation.meta?.invalidates?.some((queryKey) => matchQuery({ queryKey }, query)) ?? true,
37
});
38
0 commit comments