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

resolveQueryClient.md

29 lines660 Bytes

1---
2id: resolveQueryClient
3title: resolveQueryClient
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8```ts
9function resolveQueryClient(explicit?: QueryClient): QueryClient;
10```
11​
12Defined in: [packages/lit-query/src/context.ts:124](https://github.com/TanStack/query/blob/main/packages/lit-query/src/context.ts#L124)
13​
14Resolves an explicit `QueryClient` or falls back to `useQueryClient`.
15​
16## Parameters
17​
18### explicit?
19​
20[`QueryClient`](../classes/QueryClient.md)
21​
22Optional client supplied by the caller.
23​
24## Returns
25​
26[`QueryClient`](../classes/QueryClient.md)
27​
28The explicit client when provided, otherwise the current default
29client.