Files
upstream-yaak/apps/yaak-client/lib/queryClient.ts
upstream-mirror 906fb231cc
Some checks failed
Lint and Test / Lint/Test (push) Has been cancelled
Generate Sponsors README / deploy (push) Has been skipped
snapshot of https://github.com/mountain-loop/yaak.git (main, 2026-09-23; blobs > 131072B omitted)
2026-09-23 17:39:41 +05:00

19 lines
475 B
TypeScript

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
},
},
});