* A slightly more advanced method that can be used to get an existing mutation instance from * the cache. If the mutation does not exist, `undefined` is returned. * * This is not typically needed for most applications, but can come in handy when needing more * information about a mutatio
(
filters: MutationFilters,
)
| 304 | * ``` |
| 305 | */ |
| 306 | find< |
| 307 | TData = unknown, |
| 308 | TError = DefaultError, |
| 309 | TVariables = any, |
| 310 | TOnMutateResult = unknown, |
| 311 | >( |
| 312 | filters: MutationFilters, |
| 313 | ): Mutation<TData, TError, TVariables, TOnMutateResult> | undefined { |
| 314 | const defaultedFilters = { exact: true, ...filters } |
| 315 | |
| 316 | return this.getAll().find((mutation) => |
| 317 | matchMutation(defaultedFilters, mutation), |
| 318 | ) as Mutation<TData, TError, TVariables, TOnMutateResult> | undefined |
| 319 | } |
| 320 | |
| 321 | /** |
| 322 | * An even more advanced method that can be used to get existing mutation instances from the |
no test coverage detected