Skip to main content
Version: 11.x

Function: getQueryKey()

getQueryKey<TProcedureOrRouter>(procedureOrRouter, ..._params): TRPCQueryKey

Method to extract the query key for a procedure

Type Parameters

Type Parameter
TProcedureOrRouter extends ProcedureOrRouter

Parameters

ParameterTypeDescription
procedureOrRouterTProcedureOrRouterprocedure or AnyRouter
..._paramsGetParams<TProcedureOrRouter>-

Returns

TRPCQueryKey

See

https://trpc.io/docs/v11/getQueryKey

Defined in

packages/react-query/src/internals/getQueryKey.ts:109