(queryInvalidator: QueryInvalidator<RInvalidator>)
| 415 | /** |
| 416 | * A callable mutation result. When `I = void` the input argument may be omitted. |
| 417 | */ |
| 418 | export interface MutationFn<I, A, E, R, Id extends string> { |
| 419 | <B = A, E2 = never, R2 = never>( |
| 420 | input: I, |
| 421 | options?: MutationOptionsBase<A, B, E2, R2> |
| 422 | ): Effect.Effect<B, E | E2, R | R2> |
| 423 | readonly id: Id |
| 424 | } |
| 425 | |
| 426 | export const makeMutation = <RInvalidator>(queryInvalidator: QueryInvalidator<RInvalidator>) => { |
| 427 | /** |
| 428 | * Pass a function that returns an Effect, e.g from a client action. |
| 429 | * Executes query cache invalidation based on default rules or provided option. |
| 430 | * When `I = void` the input argument may be omitted. |
| 431 | */ |
| 432 | const useMutation = <I, E, A, R, Request extends Req, Id extends string>( |
| 433 | self: RequestHandlerWithInput<I, A, E, R, Request, Id> |
| 434 | ): MutationFn<I, A, E, R, Id> => { |
no outgoing calls
no test coverage detected
searching dependent graphs…