Skip to content

Why is there no fetchElseReturnCacheData policy? #392

@ValCanBuild

Description

@ValCanBuild

Hello, first time user of Apollo-iOS here, though I have been using Apollo android for quite some time.

In Apollo Android there is NetworkFirst ResponseFetcher (that I assume to be an equivalent of Apollo.CachePolicy in iOS). The description of this fetcher is

  /**
   * Signals the apollo client to first fetch the data from the network. If network request fails, then the
   * data is fetched from the normalized cache. If the data is not present in the normalized cache, then the
   * exception which led to the network request failure is rethrown.
   */

This has been very useful to me in Android for showing good offline state when calls fail. I was wondering why there isn't an equivalent functionality in iOS. Is it on purpose or has it just not been requested?

Metadata

Metadata

Assignees

No one assigned

    Labels

    cachingenhancementIssues outlining new things we want to do or things that will make our lives as devs easiernetworking-stack

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions