From 57c44b944ca8975a6951927543aa46a5743cd1d5 Mon Sep 17 00:00:00 2001 From: Nick De Villiers Date: Mon, 20 Jan 2025 11:07:17 +0000 Subject: [PATCH] chore: clean up comments around react query code --- src/app/api/query-client.ts | 5 ----- 1 file changed, 5 deletions(-) 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: {