MCPcopy Create free account
hub / github.com/TanStack/query / getQueryClient

Function getQueryClient

packages/lit-query/src/controllers/BaseController.ts:161–168  ·  view source on GitHub ↗

* Returns the `QueryClient`, throwing when none is available. * @returns The explicitly passed client, otherwise the client from context. * @throws {Error} If no `QueryClient` is available.

()

Source from the content-addressed store, hash-verified

159 * @throws {Error} If no `QueryClient` is available.
160 */
161 protected getQueryClient(): QueryClient {
162 const client = this.tryGetQueryClient()
163 if (!client) {
164 throw createMissingQueryClientError()
165 }
166
167 return client
168 }
169
170 /**
171 * Stores a new result and requests a host update, unless it is the same

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected