GraphQLCache constructor

GraphQLCache({
  1. Store? store,
  2. DataIdResolver? dataIdFromObject,
  3. Map<String, TypePolicy> typePolicies = const {},
  4. Map<String, Set<String>> possibleTypes = const {},
  5. PartialDataCachePolicy partialDataPolicy = PartialDataCachePolicy.acceptForOptimisticData,
  6. Object? sanitizeVariables(
    1. Object?
    ) = sanitizeFilesForCache,
})

Implementation

GraphQLCache({
  Store? store,
  this.dataIdFromObject,
  this.typePolicies = const {},
  this.possibleTypes = const {},
  this.partialDataPolicy = PartialDataCachePolicy.acceptForOptimisticData,
  Object? Function(Object?) sanitizeVariables = sanitizeFilesForCache,
})  : sanitizeVariables = variableSanitizer(sanitizeVariables),
      store = store ?? InMemoryStore();