CacheableMutationWithInput

class CacheableMutationWithInput<TInput : CacheableInput.MutationInput, TData, TError : Throwable>(launchMutation: suspend (input: TInput) -> TData?, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default)

Constructors

Link copied to clipboard
constructor(launchMutation: suspend (input: TInput) -> TData?, cache: OnHandCache, dispatcher: CoroutineDispatcher = Dispatchers.Default)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
operator fun component1(): StateFlow<CacheableMutationResult<TData, TError>>
Link copied to clipboard
suspend fun mutate(queryInput: TInput, optimisticUpdate: (input: TInput) -> Map<out CacheableInput, Any?>? = null, onSuccess: suspend (TData) -> Unit? = null, onError: suspend (TError) -> Unit? = null)