0
Fork 0
mirror of https://github.com/TanStack/query.git synced 2026-11-16 22:50:20 +00:00
query/docs/framework/angular/reference/functions/provideQueryClient.md
Lachlan Collins 5ad78fc4ad
docs: correct local relative links (#9947)
* docs: correct local relative links

* Update links

* Slight tweaks

* String
2025-12-05 22:39:25 +11:00

1,013 B

id title
provideQueryClient provideQueryClient

Function: provideQueryClient()

function provideQueryClient(queryClient): Provider;

Defined in: providers.ts:14

Usually provideTanStackQuery is used once to set up TanStack Query and the https://tanstack.com/query/latest/docs/reference/QueryClient|QueryClient for the entire application. Internally it calls provideQueryClient. You can use provideQueryClient to provide a different QueryClient instance for a part of the application or for unit testing purposes.

Parameters

queryClient

A QueryClient instance, or an InjectionToken which provides a QueryClient.

QueryClient | InjectionToken<QueryClient>

Returns

Provider

a provider object that can be used to provide the QueryClient instance.