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