wouldInvalidate method

InvalidationPreview wouldInvalidate(
  1. OperationMeta meta, [
  2. TagContext args = TagContext.empty,
  3. Object? response
])

What would meta invalidate, and who would it reach? While an identity change is in progress, or once the inspector is disposed, no query is reached.

Implementation

InvalidationPreview wouldInvalidate(
  OperationMeta meta, [
  TagContext args = TagContext.empty,
  Object? response,
]) {
  if (_answerable()) return ex.wouldInvalidate(_dev, meta, args, response);

  final resolved = resolveTags(meta.invalidates, args, response);

  return InvalidationPreview(
    operation: operationName(meta),
    templates: [...meta.invalidates],
    tags: [...resolved.tags],
    unresolved: [...resolved.unresolved],
    hits: [
      for (final tag in resolved.tags) TagHit(tag: tag, queries: const []),
    ],
    missed: [...resolved.tags],
  );
}