enqueueMutation

suspend fun <B : Any> enqueueMutation(key: MutationKey, endpoint: NetworkEndpoint, body: B? = null, bodyType: TypeInfo? = null, codec: MutationCodec<B>? = null, retryPolicy: RetryPolicy? = null): MutationHandle

Enqueues a mutation and returns immediately; endpoint (with body, described by bodyType) is executed on scope in the background, retried per retryPolicy (or defaultRetryPolicy when null), and coalesced with any other pending mutation sharing key.

Prefer the reified enqueue extensions for typed bodies; this is the type-erased core (see ApiClient.request for the same pattern).

Parameters

codec

when non-null, persists the mutation to store so it can be replayed via restore after a process restart. Omitted mutations are in-memory only.