SurfSense/surfsense_web/lib/query-client/client.ts
DESKTOP-RTLN3BA\$punk 1bb9f479e1 feat: refactor document fetching and improve comment batching
- Replaced the useDocuments hook with React Query for better caching and deduplication of document requests.
- Updated the ConnectorIndicator component to fetch document type counts using a new atom for real-time updates.
- Enhanced the useComments hook to manage batch requests more effectively, reducing race conditions and improving performance.
- Set default query options in the query client to optimize stale time and refetch behavior.
2026-02-28 01:54:54 -08:00

10 lines
198 B
TypeScript

import { QueryClient } from "@tanstack/react-query";
export const queryClient = new QueryClient({
defaultOptions: {
queries: {
staleTime: 30_000,
refetchOnWindowFocus: false,
},
},
});