Open History to see the last commit
1---
2id: getDefaultQueryClient
3title: getDefaultQueryClient
4---
5β
6# Function: getDefaultQueryClient()
7β
8```ts
9function getDefaultQueryClient(): QueryClient | undefined;
10```
11β
12Defined in: [packages/lit-query/src/context.ts:72](https://github.com/TanStack/query/blob/main/packages/lit-query/src/context.ts#L72)
13β
14Returns the registered default `QueryClient`, if exactly one default client is
15available.
16β
17## Returns
18β
19`QueryClient` \| `undefined`
20β
21The default query client, or `undefined` when there is no registered
22client or more than one registered client.