Class 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 empty Response is sent back with the Operation info wrapped inside.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ApolloInterceptor provideInterceptor​(com.apollographql.apollo.api.internal.ApolloLogger apolloLogger)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CacheOnlyFetcher

        public CacheOnlyFetcher()
    • Method Detail

      • provideInterceptor

        public ApolloInterceptor provideInterceptor​(com.apollographql.apollo.api.internal.ApolloLogger apolloLogger)
        Specified by:
        provideInterceptor in interface ResponseFetcher
        Parameters:
        apolloLogger - A ApolloLogger to log relevant fetch information.
        Returns:
        The ApolloInterceptor that executes the fetch logic.