fetch

suspend fun <T, S> QueryCommand.Context<QueryChunks<T, S>>.fetch(key: InfiniteQueryKey<T, S>, variable: S, retryFn: RetryFn<T> = options.exponentialBackOff(onRetry = onRetryCallback(key.id))): Result<T>

Fetches data for the InfiniteQueryKey using the value of variable.

Receiver

QueryCommand.Context for InfiniteQueryKey.

Parameters

T

Type of data to retrieve.

S

Type of parameter.

key

Instance of a class implementing InfiniteQueryKey.

variable

Value of the parameter required for fetching data for InfiniteQueryKey.

retryFn

Retry strategy.


suspend fun <T> QueryCommand.Context<T>.fetch(key: QueryKey<T>, retryFn: RetryFn<T> = options.exponentialBackOff(onRetry = onRetryCallback(key.id))): Result<T>

Fetches the data.

Return

The result of the fetch.

Parameters

key

Instance of a class implementing QueryKey.

retryFn

The retry function.