update createApi
This commit is contained in:
parent
1d70707454
commit
142e5982b1
324
dist/core.js
vendored
324
dist/core.js
vendored
File diff suppressed because one or more lines are too long
@ -122,6 +122,15 @@ export function createApi({
|
||||
});
|
||||
}
|
||||
|
||||
const extraInvalidateKeys =
|
||||
typeof action.invalidateKeys === "function"
|
||||
? action.invalidateKeys(responseData, variables)
|
||||
: action.invalidateKeys;
|
||||
|
||||
extraInvalidateKeys?.forEach((queryKey) => {
|
||||
queryClient.invalidateQueries({ queryKey });
|
||||
});
|
||||
|
||||
options.onSuccess?.(...args);
|
||||
},
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user