query

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

Support function to execute a GraphQl query. It will run off the main Thread and gives the result back on the main thread. 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
query

to be executed

callback

receiving the Result

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

Support function to execute a GraphQl query. It will run off the main Thread and gives the result back on the main thread. 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
query

to be executed

lifecycleOwner

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

callback

receiving the Result

abstract fun <D : Operation.Data, T, V : Operation.Variables> query(query: Query<D, T, V>, updateIntervalMillis: Long, callback: (Result<T>) -> Unit): Cancelable

Support function to execute a GraphQl query. It will run off the main Thread and gives the result back on the main thread. 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
query

to be executed

updateIntervalMillis

fires the query within this interval. If its zero or less the query will execute only once

callback

receiving the Result

abstract fun <D : Operation.Data, T, V : Operation.Variables> query(query: Query<D, T, V>, updateIntervalMillis: Long, lifecycleOwner: LifecycleOwner, callback: (Result<T>) -> Unit): Cancelable

Support function to execute a GraphQl query. It will run off the main Thread and gives the result back on the main thread. 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
query

to be executed

updateIntervalMillis

fires the query within this interval. If its zero or less the query will execute only once

lifecycleOwner

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

callback

receiving the Result