Skip to content

Commit

Permalink
fix(react-query): set react-query networkMode to offlineFirst EE-7081 (
Browse files Browse the repository at this point in the history
  • Loading branch information
cmenginnz committed May 20, 2024
1 parent db8f9c6 commit 2669a44
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/react-tools/react-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2669a44

Please sign in to comment.