Class CacheOnlyFetcher
- java.lang.Object
-
- com.apollographql.apollo.internal.fetcher.CacheOnlyFetcher
-
- All Implemented Interfaces:
ResponseFetcher
public final class CacheOnlyFetcher extends java.lang.Object implements ResponseFetcher
Signals the apollo client to only fetch the data from the normalized cache. If it's not present in the normalized cache or if an exception occurs while trying to fetch it from the normalized cache, an emptyResponseis sent back with theOperationinfo wrapped inside.
-
-
Constructor Summary
Constructors Constructor Description CacheOnlyFetcher()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApolloInterceptorprovideInterceptor(com.apollographql.apollo.api.internal.ApolloLogger apolloLogger)
-
-
-
Method Detail
-
provideInterceptor
public ApolloInterceptor provideInterceptor(com.apollographql.apollo.api.internal.ApolloLogger apolloLogger)
- Specified by:
provideInterceptorin interfaceResponseFetcher- Parameters:
apolloLogger- AApolloLoggerto log relevant fetch information.- Returns:
- The
ApolloInterceptorthat executes the fetch logic.
-
-