MCPcopy Index your code
hub / github.com/code-with-antonio/nodebase / makeQueryClient

Function makeQueryClient

src/trpc/query-client.ts:6–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

4} from '@tanstack/react-query';
5import superjson from 'superjson';
6export function makeQueryClient() {
7 return new QueryClient({
8 defaultOptions: {
9 queries: {
10 staleTime: 30 * 1000,
11 },
12 dehydrate: {
13 serializeData: superjson.serialize,
14 shouldDehydrateQuery: (query) =>
15 defaultShouldDehydrateQuery(query) ||
16 query.state.status === 'pending',
17 },
18 hydrate: {
19 deserializeData: superjson.deserialize,
20 },
21 },
22 });
23}

Callers 1

getQueryClientFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected