Skip to content

Commit

Permalink
fix(core): update query client defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
EdieLemoine committed Mar 15, 2023
1 parent dac6aa2 commit 92017fc
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions libs/frontend/core/src/pdk/instance/createQueryClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,24 @@ const addApiErrorNotification = (error: unknown) => {
export const createQueryClient = (): QueryClient =>
new QueryClient({
defaultOptions: {
mutations: {
onError: addApiErrorNotification,
onMutate: clearApiNotifications,
retry: false,
},

queries: {
behavior: {
onFetch: clearApiNotifications,
},
onError: addApiErrorNotification,
refetchInterval: false,
refetchOnMount: false,
refetchOnReconnect: false,
refetchOnWindowFocus: false,
retry: false,
retryOnMount: false,
staleTime: Infinity,
behavior: {
onFetch: clearApiNotifications,
},
onError: addApiErrorNotification,
},

mutations: {
retry: false,
onMutate: clearApiNotifications,
onError: addApiErrorNotification,
},
},
});

0 comments on commit 92017fc

Please sign in to comment.