Skip to content
tRPC

Partners

Function: ~~getMutationKey()~~

On this page

getMutationKey<TProcedure>(procedure): TRPCMutationKey

Defined in: packages/react-query/src/internals/getQueryKey.ts:148

Returns the TanStack Query mutation key for a procedure.

Type Parameters

Type Parameter
TProcedure extends DecoratedMutation<any>

Parameters

ParameterType
procedureTProcedure

Returns

TRPCMutationKey

Deprecated

@trpc/react-query only gets bug fixes and will be removed in the next major version. Use @trpc/tanstack-react-query instead, where each mutation has a mutationKey() method.

See