convertStreamFetchPolicyToGetFetchPolicy function

GetFetchPolicy convertStreamFetchPolicyToGetFetchPolicy(
  1. StreamFetchPolicy fetchPolicy
)

Implementation

GetFetchPolicy convertStreamFetchPolicyToGetFetchPolicy(
  StreamFetchPolicy fetchPolicy,
) {
  switch (fetchPolicy) {
    case StreamFetchPolicy.serverFirst:
      return GetFetchPolicy.serverOnly;
    case StreamFetchPolicy.cacheFirst:
      return GetFetchPolicy.cacheFirst;
    default:
      return GetFetchPolicy.cacheOnly;
  }
}