Open History to see the last commit
1---
2id: registerDefaultQueryClient
3title: registerDefaultQueryClient
4---
5β
6# Function: registerDefaultQueryClient()
7β
8```ts
9function registerDefaultQueryClient(client): void;
10```
11β
12Defined in: [packages/lit-query/src/context.ts:32](https://github.com/TanStack/query/blob/main/packages/lit-query/src/context.ts#L32)
13β
14Registers a `QueryClient` as a process-local fallback for APIs that resolve a
15client without an explicit argument.
16β
17`QueryClientProvider` calls this automatically while it is connected. Prefer
18passing an explicit client or rendering under a provider when possible.
19β
20## Parameters
21β
22### client
23β
24`QueryClient`
25β
26The query client to register as the current default.
27β
28## Returns
29β
30`void`