diff options
Diffstat (limited to 'apps/web/lib/query-client.ts')
| -rw-r--r-- | apps/web/lib/query-client.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/web/lib/query-client.ts b/apps/web/lib/query-client.ts index c64e4c7..1e500a0 100644 --- a/apps/web/lib/query-client.ts +++ b/apps/web/lib/query-client.ts @@ -2,6 +2,11 @@ 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: { @@ -10,6 +15,10 @@ export function createQueryClient() { gcTime: TWENTY_FOUR_HOURS_IN_MILLISECONDS, refetchOnWindowFocus: false, }, + mutations: { + networkMode: "offlineFirst", + gcTime: TWENTY_FOUR_HOURS_IN_MILLISECONDS, + }, }, }) } |