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

getQueryClientContext.md

25 lines780 Bytes

function getQueryClientContext(): QueryClient;

Defined in: packages/svelte-query/src/context.ts:13

Retrieves the QueryClient set on Svelte's context by QueryClientProvider (or by setQueryClientContext directly). This is what useQueryClient calls internally.

Returns

QueryClient

The QueryClient set on context, whether by QueryClientProvider or setQueryClientContext.

Throws

If no QueryClient was found in context.