fix(react-query): set react-query networkMode to offlineFirst EE-7081 (#11812)

pull/11848/head
cmeng 2024-05-20 15:29:56 +12:00 committed by GitHub
parent db8f9c6f6c
commit 2669a44d79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -76,6 +76,11 @@ function mergeOptions<T>(options: T[]) {
export function createQueryClient() {
return new QueryClient({
defaultOptions: {
queries: {
networkMode: 'offlineFirst',
},
},
mutationCache: new MutationCache({
onError: (error, variable, context, mutation) => {
handleError(error, mutation.meta?.error);