Open History to see the last commit
1---
2id: injectMutationState
3title: injectMutationState
4---
5β
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7β
8```ts
9function injectMutationState<TResult = MutationState<unknown, Error, unknown, unknown>, TMutation extends Mutation<any, any, any, any> = MutationTypeFromResult<TResult>>(options?: () => MutationStateOptions<TResult, TMutation>): Signal<TResult[]>;
10```
11β
12Defined in: [packages/angular-query/src/inject-mutation-state.ts:70](https://github.com/TanStack/query/blob/main/packages/angular-query/src/inject-mutation-state.ts#L70)
13β
14Injects a signal that tracks the state of all mutations.
15β
16## Type Parameters
17β
18### TResult
19β
20`TResult` = [`MutationState`](../interfaces/MutationState.md)\<`unknown`, `Error`, `unknown`, `unknown`\>
21β
22### TMutation
23β
24`TMutation` *extends* [`Mutation`](../classes/Mutation.md)\<`any`, `any`, `any`, `any`\> = `MutationTypeFromResult`\<`TResult`\>
25β
26## Parameters
27β
28### options?
29β
30() => [`MutationStateOptions`](../type-aliases/MutationStateOptions.md)\<`TResult`, `TMutation`\>
31β
32A function that returns mutation state options.
33β
34<a id="options-properties"></a>
35β
36#### `options` properties
37β
38| Property | Type | Description |
39| ------ | ------ | ------ |
40| <a id="options-property-filters"></a> `filters?` | [`MutationFilters`](../interfaces/MutationFilters.md) | Restricts the mutation cache entries included in the result. |
41| <a id="options-property-select"></a> `select?` | (`mutation`: `TMutation`) => `TResult` | Maps each matching mutation to the value exposed in the result signal. |
42β
43## Returns
44β
45`Signal`\<`TResult`[]\>
46β
47The signal that tracks the state of all mutations.