FetchPolicy determines how it is resolved by Ferry, either from the
gql_link, from the Cache, or both.
For example, executing the following
reviewsReq will bypass the cache and return results only from the network.
Valid options for
CacheFirst: Return result from cache. Only fetch from network if cached result is not available.
CacheAndNetwork: Return result from cache first (if it exists), then return network result once it's available.
NetworkOnly: Return result from network, fail if network call doesn't succeed, save to cache.
CacheOnly: Return result from cache.
NoCache: Return result from network, fail if network call doesn't succeed, don't save to cache
Ferry uses the following defaults for each GraphQL operation type:
You can override these defaults by including a
defaultFetchPolicies map when initializing the client.