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 bd467c5 commit 94c32c1Copy full SHA for 94c32c1
packages/react/src/data-connect/useConnectMutation.ts
@@ -52,14 +52,14 @@ export function useConnectMutation<
52
onSuccess(...args) {
53
if (options?.invalidate && options.invalidate.length) {
54
for (const ref of options.invalidate) {
55
- if ("variables" in ref) {
+ if ("variables" in ref && ref.variables !== undefined) {
56
queryClient.invalidateQueries({
57
- queryKey: [ref.name, ref.variables || null],
+ queryKey: [ref.name, ref.variables],
58
exact: true,
59
});
60
} else {
61
62
- queryKey: [ref().name],
+ queryKey: [ref.name],
63
64
}
65
0 commit comments