Package-level declarations

Types

Link copied to clipboard
sealed interface CachingStrategy

A mechanism to finely adjust the behavior of the query results on a component basis in Composable functions.

Link copied to clipboard

Configuration for the infinite query.

Link copied to clipboard
data class InfiniteQueryLoadingErrorObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit, val loadMore: suspend (param: S) -> Unit, val loadMoreParam: S?) : InfiniteQueryObject<T, S>

A InfiniteQueryLoadingErrorObject represents the initial loading error state of the InfiniteQueryObject.

Link copied to clipboard
data class InfiniteQueryLoadingObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit, val loadMore: suspend (param: S) -> Unit, val loadMoreParam: S?) : InfiniteQueryObject<T, S>

A InfiniteQueryLoadingObject represents the initial loading state of the InfiniteQueryObject.

Link copied to clipboard
sealed interface InfiniteQueryObject<out T, S> : QueryModel<T>

A InfiniteQueryObject represents QueryModels interface for infinite fetching data using a retrieval method known as "infinite scroll."

Link copied to clipboard

A mapper that converts QueryState to InfiniteQueryObject.

Link copied to clipboard

A recomposition optimizer for QueryState with QueryChunks.

Link copied to clipboard
data class InfiniteQueryRefreshErrorObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit, val loadMore: suspend (param: S) -> Unit, val loadMoreParam: S?) : InfiniteQueryObject<T, S>

A InfiniteQueryRefreshErrorObject represents the refresh error state of the InfiniteQueryObject.

Link copied to clipboard

A mechanism to finely adjust the behavior of the infinite-query on a component basis in Composable functions.

Link copied to clipboard
data class InfiniteQuerySuccessObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit, val loadMore: suspend (param: S) -> Unit, val loadMoreParam: S?) : InfiniteQueryObject<T, S>

A InfiniteQuerySuccessObject represents the successful state of the InfiniteQueryObject.

Link copied to clipboard

Configuration for the mutation.

Link copied to clipboard
data class MutationErrorObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable, val errorUpdatedAt: Long, val mutatedCount: Int, val mutate: suspend (S) -> T, val mutateAsync: suspend (S) -> Unit, val reset: suspend () -> Unit) : MutationObject<T, S>

A MutationErrorObject represents the error state of the MutationObject.

Link copied to clipboard
data class MutationIdleObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val mutatedCount: Int, val mutate: suspend (S) -> T, val mutateAsync: suspend (S) -> Unit, val reset: suspend () -> Unit) : MutationObject<T, S>

A MutationIdleObject represents the initial idle state of the MutationObject.

Link copied to clipboard
data class MutationLoadingObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val mutatedCount: Int, val mutate: suspend (S) -> T, val mutateAsync: suspend (S) -> Unit, val reset: suspend () -> Unit) : MutationObject<T, S>

A Mutation Loading Object represents the waiting execution result state of the Mutation Object.

Link copied to clipboard
sealed interface MutationObject<out T, S> : MutationModel<T>

A MutationObject represents MutationModels interface for mutating data.

Link copied to clipboard

A mapper that converts MutationState to MutationObject.

Link copied to clipboard

A recomposition optimizer for MutationState.

Link copied to clipboard

A mechanism to finely adjust the behavior of the mutation on a component basis in Composable functions.

Link copied to clipboard
data class MutationSuccessObject<T, S>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val mutatedCount: Int, val mutate: suspend (S) -> T, val mutateAsync: suspend (S) -> Unit, val reset: suspend () -> Unit) : MutationObject<T, S>

A MutationSuccessObject represents the successful state of the MutationObject.

Link copied to clipboard

Configuration for the query.

Link copied to clipboard
data class QueryLoadingErrorObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit) : QueryObject<T>

A QueryLoadingErrorObject represents the initial loading error state of the QueryObject.

Link copied to clipboard
data class QueryLoadingObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit) : QueryObject<T>

A QueryIdleObject represents the initial loading state of the QueryObject.

Link copied to clipboard
sealed interface QueryObject<out T> : QueryModel<T>

A QueryObject represents QueryModels interface for fetching data.

Link copied to clipboard

A mapper that converts QueryState to QueryObject.

Link copied to clipboard

A recomposition optimizer for QueryState.

Link copied to clipboard
data class QueryRefreshErrorObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit) : QueryObject<T>

A QueryRefreshErrorObject represents the refresh error state of the QueryObject.

Link copied to clipboard

A mechanism to finely adjust the behavior of the query on a component basis in Composable functions.

Link copied to clipboard
data class QuerySuccessObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val staleAt: Long, val fetchStatus: QueryFetchStatus, val isInvalidated: Boolean, val refresh: suspend () -> Unit) : QueryObject<T>

A QuerySuccessObject represents the successful state of the QueryObject.

Link copied to clipboard

Configuration for the subscription.

Link copied to clipboard
data class SubscriptionErrorObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable, val errorUpdatedAt: Long, val subscriberStatus: SubscriberStatus, val subscribe: suspend () -> Unit, val unsubscribe: () -> Unit, val reset: suspend () -> Unit) : SubscriptionObject<T>

A SubscriptionErrorObject represents the error state of the SubscriptionObject.

Link copied to clipboard
data class SubscriptionIdleObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val subscribe: suspend () -> Unit, val unsubscribe: () -> Unit, val reset: suspend () -> Unit) : SubscriptionObject<T>

A SubscriptionIdleObject represents the initial idle state of the SubscriptionObject.

Link copied to clipboard
data class SubscriptionLoadingObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val subscribe: suspend () -> Unit, val unsubscribe: () -> Unit, val reset: suspend () -> Unit) : SubscriptionObject<T>

A SubscriptionLoadingObject represents the initial loading state of the SubscriptionObject.

Link copied to clipboard
sealed interface SubscriptionObject<out T> : SubscriptionModel<T>

A SubscriptionObject represents SubscriptionModels interface for receiving data.

Link copied to clipboard
Link copied to clipboard

A recomposition optimizer for SubscriptionState.

Link copied to clipboard

A mechanism to finely adjust the behavior of the subscription on a component basis in Composable functions.

Link copied to clipboard
data class SubscriptionSuccessObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val subscriberStatus: SubscriberStatus, val subscribe: suspend () -> Unit, val unsubscribe: () -> Unit, val reset: suspend () -> Unit) : SubscriptionObject<T>

A SubscriptionSuccessObject represents the successful state of the SubscriptionObject.

Properties

Link copied to clipboard

Optimizer implementation for InfiniteQueryStrategy.Companion.Default.

The default built-in strategy for Infinite Query built into the library.

Optimizer implementation for MutationStrategy.Companion.Default.

The default built-in strategy for Mutation built into the library.

The default QueryObjectMapper.

Optimizer implementation for QueryStrategy.Companion.Default.

The default built-in strategy for Query built into the library.

Optimizer implementation for SubscriptionStrategy.Companion.Default.

The default built-in strategy for Subscription built into the library.

Link copied to clipboard

Optimizer implementation for SubscriptionStrategy.Companion.Lazy.

Strategy for manually starting the Subscription without automatic subscription.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Creates a MutationConfig with the provided initializer.

Link copied to clipboard

Creates a QueryConfig with the provided initializer.

Link copied to clipboard
fun <T, S> rememberInfiniteQuery(key: InfiniteQueryKey<T, S>, config: InfiniteQueryConfig = InfiniteQueryConfig.Default, client: QueryClient = LocalQueryClient.current): InfiniteQueryObject<QueryChunks<T, S>, S>
fun <T, S, U> rememberInfiniteQuery(key: InfiniteQueryKey<T, S>, select: (QueryChunks<T, S>) -> U, config: InfiniteQueryConfig = InfiniteQueryConfig.Default, client: QueryClient = LocalQueryClient.current): InfiniteQueryObject<U, S>

Remember a InfiniteQueryObject and subscribes to the query state of key.

Link copied to clipboard
fun <T, S, V> rememberInfiniteQueryIf(value: V, keyFactory: (value: V) -> InfiniteQueryKey<T, S>?, config: InfiniteQueryConfig = InfiniteQueryConfig.Default, client: QueryClient = LocalQueryClient.current): InfiniteQueryObject<QueryChunks<T, S>, S>?
fun <T, S, U, V> rememberInfiniteQueryIf(value: V, keyFactory: (value: V) -> InfiniteQueryKey<T, S>?, select: (QueryChunks<T, S>) -> U, config: InfiniteQueryConfig = InfiniteQueryConfig.Default, client: QueryClient = LocalQueryClient.current): InfiniteQueryObject<U, S>?

Provides a conditional rememberInfiniteQuery.

Link copied to clipboard
fun <T, S> rememberMutation(key: MutationKey<T, S>, config: MutationConfig = MutationConfig.Default, client: MutationClient = LocalMutationClient.current): MutationObject<T, S>

Remember a MutationObject and subscribes to the mutation state of key.

Link copied to clipboard
fun <T, S, V> rememberMutationIf(value: V, keyFactory: (value: V) -> MutationKey<T, S>?, config: MutationConfig = MutationConfig.Default, client: MutationClient = LocalMutationClient.current): MutationObject<T, S>?

Provides a conditional rememberMutation.

Link copied to clipboard
fun <T> rememberQuery(key: QueryKey<T>, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<T>
fun <T, U> rememberQuery(key: QueryKey<T>, select: (T) -> U, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<U>

Remember a QueryObject and subscribes to the query state of key.

fun <T, R> rememberQuery(keys: List<QueryKey<T>>, transform: (List<T>) -> R, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<R>

Remember a QueryObject and subscribes to the query state of keys.

fun <T1, T2, R> rememberQuery(key1: QueryKey<T1>, key2: QueryKey<T2>, transform: (T1, T2) -> R, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<R>

Remember a QueryObject and subscribes to the query state of key1 and key2.

fun <T1, T2, T3, R> rememberQuery(key1: QueryKey<T1>, key2: QueryKey<T2>, key3: QueryKey<T3>, transform: (T1, T2, T3) -> R, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<R>

Remember a QueryObject and subscribes to the query state of key1, key2, and key3.

Link copied to clipboard
fun <T, V> rememberQueryIf(value: V, keyFactory: (value: V) -> QueryKey<T>?, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<T>?
@JvmName(name = "rememberQueryIfWithPair")
fun <T1, T2, R, V> rememberQueryIf(value: V, keyPairFactory: (value: V) -> Pair<QueryKey<T1>, QueryKey<T2>>?, transform: (T1, T2) -> R, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<R>?
@JvmName(name = "rememberQueryIfWithTriple")
fun <T1, T2, T3, R, V> rememberQueryIf(value: V, keyTripleFactory: (value: V) -> Triple<QueryKey<T1>, QueryKey<T2>, QueryKey<T3>>?, transform: (T1, T2, T3) -> R, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<R>?
@JvmName(name = "rememberQueryIfWithList")
fun <T, R, V> rememberQueryIf(value: V, keyListFactory: (value: V) -> List<QueryKey<T>>?, transform: (List<T>) -> R, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<R>?
fun <T, U, V> rememberQueryIf(value: V, keyFactory: (value: V) -> QueryKey<T>?, select: (T) -> U, config: QueryConfig = QueryConfig.Default, client: QueryClient = LocalQueryClient.current): QueryObject<U>?

Provides a conditional rememberQuery.

Link copied to clipboard
fun <T> rememberSubscription(key: SubscriptionKey<T>, config: SubscriptionConfig = SubscriptionConfig.Default, client: SubscriptionClient = LocalSubscriptionClient.current): SubscriptionObject<T>
fun <T, U> rememberSubscription(key: SubscriptionKey<T>, select: (T) -> U, config: SubscriptionConfig = SubscriptionConfig.Default, client: SubscriptionClient = LocalSubscriptionClient.current): SubscriptionObject<U>

Remember a SubscriptionObject and subscribes to the subscription state of key.

Link copied to clipboard
fun <T, V> rememberSubscriptionIf(value: V, keyFactory: (value: V) -> SubscriptionKey<T>?, config: SubscriptionConfig = SubscriptionConfig.Default, client: SubscriptionClient = LocalSubscriptionClient.current): SubscriptionObject<T>?
fun <T, U, V> rememberSubscriptionIf(value: V, keyFactory: (value: V) -> SubscriptionKey<T>?, select: (T) -> U, config: SubscriptionConfig = SubscriptionConfig.Default, client: SubscriptionClient = LocalSubscriptionClient.current): SubscriptionObject<U>?

Provides a conditional rememberSubscription.

Link copied to clipboard
Link copied to clipboard
fun SwrClientProvider(client: SwrClient, content: @Composable () -> Unit)

Provides a SwrClient to the content over LocalSwrClient

Provides a SwrClientPlus to the content over LocalSwrClient