Skip to main content

getQueryKey()

Public API for getting a query key from a procedure or router. The svelteQueryProxy returns a path array when _def() is called, not indicated by type definitions.

Signature

getQueryKey<T>(procedureOrRouter: T, input?: unknown, type: QueryType = 'any'): QueryKey;

Type parameters

  • T extends AnyProcedure | AnyRouter

Parameters

NameTypeDefault value
procedureOrRouterTundefined
input?unknownundefined
typeQueryType'any'

Returns

QueryKey

Defined in: helpers/getQueryKey.ts:43