fix(invalidate): keep invalidate default behaviour [BE-11064] (#12080)

pull/12145/head
Ali 2024-08-27 09:48:50 +12:00 committed by GitHub
parent 59b3375b59
commit 10767a06df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 3 deletions

View File

@ -37,9 +37,7 @@ export function withInvalidate(
return { return {
onSuccess() { onSuccess() {
const promise = Promise.all( const promise = Promise.all(
queryKeysToInvalidate.map((keys) => queryKeysToInvalidate.map((keys) => queryClient.invalidateQueries(keys))
queryClient.invalidateQueries(keys, { refetchType: 'none' })
)
); );
return skipRefresh return skipRefresh
? undefined // don't wait for queries to refresh before setting state to success ? undefined // don't wait for queries to refresh before setting state to success