Open History to see the last commit
1---
2id: provideQueryClient
3title: provideQueryClient
4---
5β
6# Function: provideQueryClient()
7β
8```ts
9function provideQueryClient(queryClient): Provider;
10```
11β
12Defined in: [providers.ts:14](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/providers.ts#L14)
13β
14Usually [provideTanStackQuery](provideTanStackQuery.md) is used once to set up TanStack Query and the
15[https://tanstack.com/query/latest/docs/reference/QueryClient\|QueryClient](https://tanstack.com/query/latest/docs/reference/QueryClient|QueryClient)
16for the entire application. Internally it calls `provideQueryClient`.
17You can use `provideQueryClient` to provide a different `QueryClient` instance for a part
18of the application or for unit testing purposes.
19β
20## Parameters
21β
22### queryClient
23β
24A `QueryClient` instance, or an `InjectionToken` which provides a `QueryClient`.
25β
26`QueryClient` | `InjectionToken`\<`QueryClient`\>
27β
28## Returns
29β
30`Provider`
31β
32a provider object that can be used to provide the `QueryClient` instance.