MCPcopy
hub / github.com/simstudioai/sim / makeQueryClient

Function makeQueryClient

apps/sim/app/_shell/providers/get-query-client.ts:3–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { defaultShouldDehydrateQuery, isServer, QueryClient } from '@tanstack/react-query'
2
3function makeQueryClient() {
4 return new QueryClient({
5 defaultOptions: {
6 queries: {
7 staleTime: 30 * 1000,
8 gcTime: 5 * 60 * 1000,
9 refetchOnWindowFocus: false,
10 retry: 1,
11 retryOnMount: false,
12 },
13 mutations: {
14 retry: false,
15 },
16 dehydrate: {
17 shouldDehydrateQuery: (query) =>
18 defaultShouldDehydrateQuery(query) || query.state.status === 'pending',
19 },
20 },
21 })
22}
23
24let browserQueryClient: QueryClient | undefined
25

Callers 1

getQueryClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected