public final class ApolloClient extends java.lang.Object implements ApolloQueryCall.Factory, ApolloMutationCall.Factory, ApolloPrefetch.Factory
See the ApolloClient.Builder class for configuring the ApolloClient.
| Modifier and Type | Class and Description |
|---|---|
static class |
ApolloClient.Builder |
| Modifier and Type | Method and Description |
|---|---|
int |
activeCallsCount()
Returns the count of
ApolloCall & ApolloPrefetch objects which are currently in progress. |
ApolloStore |
apolloStore() |
static ApolloClient.Builder |
builder() |
void |
clearNormalizedCache()
Clear all entries from the normalized cache.
|
CacheHeaders |
defaultCacheHeaders() |
void |
idleCallback(IdleResourceCallback idleResourceCallback)
Sets the idleResourceCallback which will be called when this ApolloClient is idle.
|
<D extends com.apollographql.apollo.api.Operation.Data,T,V extends com.apollographql.apollo.api.Operation.Variables> |
mutate(com.apollographql.apollo.api.Mutation<D,T,V> mutation)
Creates and prepares a new
ApolloMutationCall call. |
<D extends com.apollographql.apollo.api.Operation.Data,T,V extends com.apollographql.apollo.api.Operation.Variables> |
prefetch(com.apollographql.apollo.api.Operation<D,T,V> operation)
Prepares the
ApolloPrefetch which will be executed at some point in the future. |
<D extends com.apollographql.apollo.api.Operation.Data,T,V extends com.apollographql.apollo.api.Operation.Variables> |
query(com.apollographql.apollo.api.Query<D,T,V> query)
Creates and prepares a new
ApolloQueryCall call. |
public static ApolloClient.Builder builder()
public <D extends com.apollographql.apollo.api.Operation.Data,T,V extends com.apollographql.apollo.api.Operation.Variables> ApolloMutationCall<T> mutate(@Nonnull com.apollographql.apollo.api.Mutation<D,T,V> mutation)
ApolloMutationCall.FactoryApolloMutationCall call.mutate in interface ApolloMutationCall.Factorymutation - the mutation which needs to be performedApolloMutationCall call to be executed at some point in the futurepublic <D extends com.apollographql.apollo.api.Operation.Data,T,V extends com.apollographql.apollo.api.Operation.Variables> ApolloQueryCall<T> query(@Nonnull com.apollographql.apollo.api.Query<D,T,V> query)
ApolloQueryCall.FactoryApolloQueryCall call.query in interface ApolloQueryCall.Factoryquery - the operation which needs to be performedApolloQueryCall call to be executed at some point in the futurepublic <D extends com.apollographql.apollo.api.Operation.Data,T,V extends com.apollographql.apollo.api.Operation.Variables> ApolloPrefetch prefetch(@Nonnull com.apollographql.apollo.api.Operation<D,T,V> operation)
ApolloPrefetch which will be executed at some point in the future.prefetch in interface ApolloPrefetch.Factoryoperation - the operation which needs to be performedpublic CacheHeaders defaultCacheHeaders()
CacheHeaders which this instance of ApolloClient was configured.public void clearNormalizedCache()
public ApolloStore apolloStore()
ApolloStore managing access to the normalized cache created by ApolloClient.Builder.normalizedCache(NormalizedCacheFactory, CacheKeyResolver) }public void idleCallback(IdleResourceCallback idleResourceCallback)
public int activeCallsCount()
ApolloCall & ApolloPrefetch objects which are currently in progress.