MutationStatus

sealed class MutationStatus

The lifecycle of one enqueued mutation, as observed via MutationQueue.statusFlow.

Optimistic-UI rollback is deliberately out of scope here: this type reports outcome (did the call eventually succeed, is it still trying, did it give up), not UI state. Callers that applied an optimistic update decide for themselves what Failed means for their UI.

Inheritors

Types

Link copied to clipboard
data class Failed(val error: NetworkError) : MutationStatus

The retry policy gave up (or refused to retry a non-idempotent failure) after error.

Link copied to clipboard
data object Pending : MutationStatus

Enqueued and waiting for its first attempt (or waiting behind a coalesced predecessor).

Link copied to clipboard
data class Retrying(val attempt: Int, val error: NetworkError) : MutationStatus

The most recent attempt failed transiently and a retry is scheduled.

Link copied to clipboard

The mutation was executed successfully.