MCPcopy Create free account
hub / github.com/dailydotdev/apps / getQueryClient

Function getQueryClient

packages/shared/src/graphql/queryClient.ts:10–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8let browserQueryClient: QueryClient | undefined;
9
10export function getQueryClient(): QueryClient {
11 if (isServer) {
12 // Server: always make a new query client
13 return makeQueryClient();
14 }
15 // Browser: make a new query client if we don't already have one
16 // This is very important, so we don't re-make a new client if React
17 // suspends during the initial render. This may not be needed if we
18 // have a suspense boundary BELOW the creation of the query client
19 if (!browserQueryClient) {
20 browserQueryClient = makeQueryClient();
21 }
22 return browserQueryClient;
23}

Callers

nothing calls this directly

Calls 1

makeQueryClientFunction · 0.85

Tested by

no test coverage detected