Package-level declarations
Types
A wrapper around CacheManager that provides a simplified API for reading and writing data.
CacheManager exposes a high-level API to access a com.apollographql.cache.normalized.api.NormalizedCache.
Properties
An interceptor that emits the response from the cache first, and then emits the response(s) from the network.
If this Error represents a cache miss, returns an equivalent CacheMissException.
An interceptor that emits the response from the cache first, and if there was a cache miss, emits the response(s) from the network.
True if this response comes from the cache, false if it comes from the network.
An interceptor that emits the response(s) from the network first, and if there was a network error, emits the response from the cache.
Functions
Add a cache header to be passed to your com.apollographql.cache.normalized.api.NormalizedCache
If this response has errors, returns a response with an exception, otherwise returns this response. This can be used to accommodate com.apollographql.apollo.ApolloCall.execute which splits responses based on exceptions and should only be called on cache responses.
Sets the initial FetchPolicy This only has effects for queries. Mutations and subscriptions always use the network only.
Sets the initial FetchPolicy This only has effects for queries. Mutations and subscriptions always use FetchPolicy.NetworkOnly
Perform garbage collection on the store.
Perform garbage collection on the cache.
Configures an ApolloClient with a normalized cache.
Sets the optimistic updates to write to the cache while a query is pending.
Sets the FetchPolicy used when watching queries and a cache change has been published
Sets the FetchPolicy used when watching queries and a cache change has been published
Remove all dangling references in the store.
Remove all dangling references in the cache. A field is a dangling reference if its value (or, for lists, any of its values) is a reference to a record that does not exist.
Removes a fragment from the store.
Removes an operation from the store.
Remove all stale fields in the store.
Remove all stale fields in the cache. A field is stale if its received date is older than its max age (configurable via maxAgeProvider) or if its expiration date has passed. A maximum staleness can be passed.
Remove all unreachable records in the store.
Remove all unreachable records in the cache. A record is unreachable if there exists no chain of references from the root record to it.
Gets initial response(s) then observes the cache for any changes.
Observes the cache for the given data. Unlike watch, no initial request is executed on the network. The fetch policy set by fetchPolicy will be used.