# Function: ~~getMutationKey()~~

> 

> **getMutationKey**\<`TProcedure`\>(`procedure`): `TRPCMutationKey`

Defined in: [packages/react-query/src/internals/getQueryKey.ts:148](https://github.com/trpc/trpc/blob/7c907acfd8b31929214792e3b8c2ad7a8ac72563/packages/react-query/src/internals/getQueryKey.ts#L148)

Returns the TanStack Query mutation key for a procedure.

## Type Parameters

| Type Parameter |
| ------ |
| `TProcedure` *extends* `DecoratedMutation`\<`any`\> |

## Parameters

| Parameter | Type |
| ------ | ------ |
| `procedure` | `TProcedure` |

## 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

 - https://trpc.io/docs/client/tanstack-react-query/migrating
 - https://trpc.io/docs/client/tanstack-react-query/usage#mutationKey
 - https://trpc.io/docs/client/react/getQueryKey#mutations
