buildMutationKey

fun <T, S> buildMutationKey(id: MutationId<T, S> = MutationId.auto(), mutate: suspend MutationReceiver.(variable: S) -> T): MutationKey<T, S>

Function for building implementations of MutationKey using Kotlin Delegation.

Note: By implementing through delegation, you can reduce the impact of future changes to MutationKey interface extensions.

Usage:

class CreatePostKey : MutationKey<Post, PostForm> by buildMutationKey(
mutate = { body -> ... }
)