added tanstack query keys and hooks

This commit is contained in:
Oliver Bryan
2026-01-20 17:00:33 +00:00
parent 45343571f5
commit 8f11805bab
10 changed files with 459 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { QueryClient } from "@tanstack/react-query";
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 5 * 60 * 1000, // 5 mins
gcTime: 10 * 60 * 1000, // 10 mins
retry: 1,
refetchOnWindowFocus: true,
refetchOnReconnect: true,
},
mutations: {
retry: 0,
},
},
});