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

Function tryGetQueryClient

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

* Returns the `QueryClient` without throwing when none is available. * @returns The explicitly passed client, otherwise the client from context, * or `undefined` if neither is available.

()

Source from the content-addressed store, hash-verified

150 * or `undefined` if neither is available.
151 */
152 protected tryGetQueryClient(): QueryClient | undefined {
153 return this.explicitClient ?? this.contextClient
154 }
155
156 /**
157 * Returns the `QueryClient`, throwing when none is available.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected