io.diff
diff(a: GraphSnapshot, b: GraphSnapshot): SnapshotDiffCompute the structural diff between two GraphSnapshot objects.
Compares node and edge IDs and property values; visual state (colors, sizes, positions) is not considered. Use this to detect what changed between an old and a new snapshot before deciding whether to import.
Static method — does not require an instance.
a | GraphSnapshot | The baseline snapshot. |
b | GraphSnapshot | The target snapshot to compare against a. |
Returns: SnapshotDiff
Example
const diff = IoApi.diff(snapshotA, snapshotB);
console.log("added nodes:", diff.nodesAdded);