summaryrefslogtreecommitdiff
path: root/apps/web/lib/query-client.ts
diff options
context:
space:
mode:
Diffstat (limited to 'apps/web/lib/query-client.ts')
-rw-r--r--apps/web/lib/query-client.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/web/lib/query-client.ts b/apps/web/lib/query-client.ts
new file mode 100644
index 0000000..82be2df
--- /dev/null
+++ b/apps/web/lib/query-client.ts
@@ -0,0 +1,12 @@
+import { QueryClient } from "@tanstack/react-query"
+
+export function createQueryClient() {
+ return new QueryClient({
+ defaultOptions: {
+ queries: {
+ staleTime: 60_000,
+ refetchOnWindowFocus: false,
+ },
+ },
+ })
+}