* Sets default options for mutations whose mutation key partially matches the given * `mutationKey`. As with QueryClient#setQueryDefaults, the order of registration * matters when several registered defaults match the same mutation key. * @param mutationKey - The mutation key that m
(
mutationKey: MutationKey,
options: OmitKeyof<
MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>,
'mutationKey'
>,
)
| 998 | * ``` |
| 999 | */ |
| 1000 | setMutationDefaults< |
| 1001 | TData = unknown, |
| 1002 | TError = DefaultError, |
| 1003 | TVariables = void, |
| 1004 | TOnMutateResult = unknown, |
| 1005 | >( |
| 1006 | mutationKey: MutationKey, |
| 1007 | options: OmitKeyof< |
| 1008 | MutationObserverOptions<TData, TError, TVariables, TOnMutateResult>, |
| 1009 | 'mutationKey' |
| 1010 | >, |
| 1011 | ): void { |
| 1012 | this.#mutationDefaults.set(hashKey(mutationKey), { |
| 1013 | mutationKey, |
| 1014 | defaultOptions: options, |
| 1015 | }) |
| 1016 | } |
| 1017 | |
| 1018 | /** |
| 1019 | * Returns the default options registered for mutations whose mutation key partially matches |
no test coverage detected