diff --git a/src/app/api/query-client.ts b/src/app/api/query-client.ts index 23964d4544..7e31bb27e7 100644 --- a/src/app/api/query-client.ts +++ b/src/app/api/query-client.ts @@ -15,24 +15,19 @@ type QueryKeySubcategories = keyof QueryKeys[T]; export type QueryKey = QueryKeys[QueryKeyCategories][QueryKeySubcategories]; -// first element of the queryKeys array -// Idk what Peter meant by the above comment, but QueryModel is basically QueryKey but not in an array from what I understand. export type QueryModel = QueryKey[number]; -// 5 minutes feels rather long for default stale time. export const defaultQueryOptions = { staleTime: 5 * 60 * 1000, // 5 minutes cacheTime: 15 * 60 * 1000, // 15 minutes refetchOnWindowFocus: true, } as const; -// 0 is far too quick lol but at least we're not using this. export const realTimeQueryOptions = { staleTime: 0, cacheTime: 60 * 1000, // 1 minute } as const; -// This just creates a query client and provides the options specified above. export const createQueryClient = () => new QueryClient({ defaultOptions: {