Context

interface Context<T>

Context for mutation command.

Parameters

T

Type of the return value from the mutation.

Properties

Link copied to clipboard
abstract val dispatch: MutationDispatch<T>
Link copied to clipboard
Link copied to clipboard
abstract val options: MutationOptions
Link copied to clipboard
Link copied to clipboard
abstract val relay: MutationErrorRelay?
Link copied to clipboard
abstract val state: MutationModel<T>

Functions

Link copied to clipboard

Dispatches the mutate failure.

Link copied to clipboard
inline suspend fun <T, S> MutationCommand.Context<T>.dispatchMutateResult(key: MutationKey<T, S>, variable: S, marker: Marker, noinline callback: MutationCallback<T>?)

Dispatches the mutation result.

Link copied to clipboard

Dispatches the mutate success.

Link copied to clipboard
suspend fun <T, S> MutationCommand.Context<T>.mutate(key: MutationKey<T, S>, variable: S, retryFn: RetryFn<T> = options.exponentialBackOff(onRetry = onRetryCallback(key.id))): Result<T>

Mutates the data.

Link copied to clipboard
Link copied to clipboard

Determines whether a mutation operation is necessary based on the current state.