mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 03:03:37 +02:00
Refactor desktop app into separate client and proxy apps
This commit is contained in:
18
apps/yaak-client/lib/queryClient.ts
Normal file
18
apps/yaak-client/lib/queryClient.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { QueryCache, QueryClient } from '@tanstack/react-query';
|
||||
|
||||
export const queryClient = new QueryClient({
|
||||
queryCache: new QueryCache({
|
||||
onError: (err, query) => {
|
||||
console.log('Query client error', { err, query });
|
||||
},
|
||||
}),
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
retry: false,
|
||||
networkMode: 'always',
|
||||
refetchOnWindowFocus: true,
|
||||
refetchOnReconnect: false,
|
||||
refetchOnMount: false, // Don't refetch when a hook mounts
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user