Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

registerDefaultQueryClient.md

30 lines767 Bytes

1---
2id: registerDefaultQueryClient
3title: registerDefaultQueryClient
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8```ts
9function registerDefaultQueryClient(client: QueryClient): void;
10```
11​
12Defined in: [packages/lit-query/src/context.ts:31](https://github.com/TanStack/query/blob/main/packages/lit-query/src/context.ts#L31)
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`](../classes/QueryClient.md)
25​
26The query client to register as the current default.
27​
28## Returns
29​
30`void`