Table of Contents

Class MutationOptions<TVariables>

Namespace
Velvet
Assembly
Velvet.Docs.dll

Options for a void mutation that takes TVariables input but returns no data. Use this overload when the mutation is fire-and-forget (typical for Store actions that update state internally).

public sealed record MutationOptions<TVariables>

Type Parameters

TVariables
Inheritance
object
MutationOptions<TVariables>

Constructors

MutationOptions(Func<TVariables, CancellationToken, VelvetTask>, Func<TVariables, VelvetTask>?, Func<Exception, TVariables, VelvetTask>?)

Options for a void mutation that takes TVariables input but returns no data. Use this overload when the mutation is fire-and-forget (typical for Store actions that update state internally).

Properties

MutationFn
OnError
OnSettled

Runs after OnSuccess or OnError, with the exception on failure and null on success.

OnSuccess
Retry

As Retry.