FetchPolicyTypedLink constructor
FetchPolicyTypedLink({
- required Link link,
- Cache? cache,
- Map<
OperationType, FetchPolicy> defaultFetchPolicies = const {},
Implementation
FetchPolicyTypedLink({
required Link link,
Cache? cache,
Map<OperationType, FetchPolicy> defaultFetchPolicies = const {},
}) : defaultFetchPolicies = {
..._defaultFetchPolicies,
...defaultFetchPolicies
} {
/// Set default cache if none is provided
this.cache = cache ??= _defaultCache = Cache();
_optimisticLinkTypedLink = TypedLink.from([
const OptimisticTypedLink(),
GqlTypedLink(link),
]);
_cacheTypedLink = CacheTypedLink(this.cache);
}