import { QueryClient } from "@tanstack/react-query" const TWENTY_FOUR_HOURS_IN_MILLISECONDS = 1000 * 60 * 60 * 24 export const MUTATION_KEYS = { toggleEntryReadState: ["toggle-entry-read-state"] as const, toggleEntrySavedState: ["toggle-entry-saved-state"] as const, } export function createQueryClient() { return new QueryClient({ defaultOptions: { queries: { staleTime: 60_000, gcTime: TWENTY_FOUR_HOURS_IN_MILLISECONDS, refetchOnWindowFocus: false, }, mutations: { networkMode: "online", gcTime: TWENTY_FOUR_HOURS_IN_MILLISECONDS, }, }, }) }