Open History to see the last commit
1---
2id: provideQueryClient
3title: provideQueryClient
4---
5β
6# Function: provideQueryClient()
7β
8```ts
9function provideQueryClient(value): Provider
10```
11β
12Usually [provideAngularQuery](provideAngularQuery.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. You can use `provideQueryClient` to provide a
15different `QueryClient` instance for a part of the application.
16β
17## Parameters
18β
19β’ **value**: `QueryClient` \| () => `QueryClient`
20β
21## Returns
22β
23`Provider`
24β
25## Defined in
26β
27[inject-query-client.ts:25](https://github.com/TanStack/query/blob/27861961bbb36e9bc25fcd45cff21b5645f02f9b/packages/angular-query-experimental/src/inject-query-client.ts#L25)