getSnapshot method

Current store counts and both retention-status projections.

Implementation

EntityGraphDevtoolsSnapshot getSnapshot() => EntityGraphDevtoolsSnapshot(
  storeId: storeId,
  capturedAt: DateTime.now().toUtc().toIso8601String(),
  counts: _collectCounts(_graph.captureSnapshot()),
  history: getHistoryStatus(),
  snapshots: getSnapshotHistoryStatus(),
  activePreviews: _previewReceipts.values
      .map(
        (receipt) => EntityGraphDevtoolsActivePreview(
          previewId: receipt.previewId,
          entity: EntityGraphDevtoolsViewMembership(
            type: receipt.type,
            id: receipt.id,
          ),
          appliedAt: receipt.appliedAt,
        ),
      )
      .toList(growable: false),
);