MutationState

data class MutationState<T> : MutationModel<T>

State for managing the execution result of Mutation.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val error: Throwable? = null

The error that occurred.

Link copied to clipboard
open override val errorUpdatedAt: Long = 0

The timestamp when the error occurred.

Link copied to clipboard
open val isFailure: Boolean

Returns true if the mutation is a failure, false otherwise.

Link copied to clipboard
open val isIdle: Boolean

Returns true if the mutation is idle, false otherwise.

Link copied to clipboard
open val isMutated: Boolean

Returns true if the mutation has been mutated, false otherwise.

Link copied to clipboard
open val isPending: Boolean

Returns true if the mutation is pending, false otherwise.

Link copied to clipboard
open val isSuccess: Boolean

Returns true if the mutation is successful, false otherwise.

Link copied to clipboard
open override val mutatedCount: Int = 0

The number of times the mutation has been mutated.

Link copied to clipboard
open override val reply: Reply<T>

The return value from the data source.

Link copied to clipboard
open override val replyUpdatedAt: Long = 0

The timestamp when the data was updated.

Link copied to clipboard
open val revision: String

The revision of the currently snapshot.

Link copied to clipboard
open override val status: MutationStatus

The status of the mutation.

Link copied to clipboard
open val submittedAt: Long

The timestamp when the mutation was submitted.

Functions

Link copied to clipboard
open override fun isAwaited(): Boolean

Returns true if the MutationModel is awaited.