MutationKey

interface MutationKey<T, S>

Interface for mutations key.

MutationKey is typically used to perform side effects on external resources, such as creating, updating, or deleting data.

Parameters

T

Type of the return value from the mutation.

S

Type of the variable to be mutated.

Properties

Link copied to clipboard
abstract val id: MutationId<T, S>

A unique identifier used for managing MutationKey.

Link copied to clipboard
abstract val mutate: suspend MutationReceiver.(variable: S) -> T

Suspending function to mutate the variable.

Functions

Link copied to clipboard

Function to configure the MutationOptions.

Link copied to clipboard
open fun onQueryUpdate(variable: S, data: T): QueryEffect?

Function to update the query cache after the mutation is executed.