mutate

abstract fun <D : Operation.Data, T, V : Operation.Variables> mutate(mutation: Mutation<D, T, V>, callback: (Result<T>) -> Unit): Cancelable

Support function to execute a GraphQl mutation. It will run off the main Thread and gives the result back on the main thread. The mutation will not be executed before user is successfully logged in. You must cancel this operation when its no longer needed or you will get memory leaks!

Note: The purpose of this function is to support clients that can not use Coroutines or the Kotlin programming language!

Since

1.3.0

Return

Cancelable It is your responsibility to cancel this operation, when no longer needed, to avoid memory leaks

Parameters

D
T
V
mutation

to be executed

callback

receiving the Result

abstract fun <D : Operation.Data, T, V : Operation.Variables> mutate(mutation: Mutation<D, T, V>, lifecycleOwner: LifecycleOwner, callback: (Result<T>) -> Unit): Cancelable

Support function to execute a GraphQl mutation. It will run off the main Thread and gives the result back on the main thread. The mutation will not be executed before user is successfully logged in. You must cancel this operation when its no longer needed or you will get memory leaks!

Note: The purpose of this function is to support clients that can not use Coroutines or the Kotlin programming language!

Since

1.9.0

Return

Cancelable In case you want to cancel before Lifecycle.State.DESTROYED

Parameters

D
T
V
mutation

to be executed

lifecycleOwner

auto cancel the Cancelable when lifecycle state is Lifecycle.State.DESTROYED

callback

receiving the Result