MutationSuccessObject

data class MutationSuccessObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val mutatedCount: Int, val mutate: suspend (S) -> T, val mutateAsync: suspend (S) -> Unit, val reset: suspend () -> Unit) : MutationObject<T, S>

A MutationSuccessObject represents the successful state of the MutationObject.

Parameters

T

Type of the return value from the mutation.

S

Type of the variable to be mutated.

Constructors

Link copied to clipboard
constructor(reply: Reply<T>, replyUpdatedAt: Long, error: Throwable?, errorUpdatedAt: Long, mutatedCount: Int, mutate: suspend (S) -> T, mutateAsync: suspend (S) -> Unit, reset: suspend () -> Unit)

Properties

Link copied to clipboard
open override val data: T

The return value from the data source. (Backward compatibility with MutationModel)

Link copied to clipboard
open override val error: Throwable?
Link copied to clipboard
open override val errorUpdatedAt: Long
Link copied to clipboard
open val isFailure: Boolean
Link copied to clipboard
open val isIdle: Boolean
Link copied to clipboard
open val isMutated: Boolean
Link copied to clipboard
open val isPending: Boolean
Link copied to clipboard
open val isSuccess: Boolean
Link copied to clipboard
open override val mutate: suspend (S) -> T

Mutates the variable.

Link copied to clipboard
open override val mutateAsync: suspend (S) -> Unit

Mutates the variable asynchronously.

Link copied to clipboard
open override val mutatedCount: Int
Link copied to clipboard
open override val reply: Reply<T>
Link copied to clipboard
open override val replyUpdatedAt: Long
Link copied to clipboard
open override val reset: suspend () -> Unit

Resets the mutation state.

Link copied to clipboard
open val revision: String
Link copied to clipboard
open override val status: MutationStatus
Link copied to clipboard
open val submittedAt: Long

Functions

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