temporal97
API Reference

Reading State

Read the graph at the current cursor position.

All methods and properties in this section reflect the graph at the current cursor position. Move the cursor with seekTo(), advance(), or rewind() to change what they return.

Nodes

Method / PropertyReturnsDescription
hasNode(id)booleanWhether the node exists at the current snapshot.
getNode(id)TNode | undefinedNode data, or undefined if deleted or never added.
liveNodes()IterableIterator<[EntityId, TNode]>All alive nodes.
nodeCountnumberNumber of alive nodes.

Edges

Method / PropertyReturnsDescription
hasEdge(id)booleanWhether the edge exists.
getEdge(id)TEdge | undefinedEdge data, or undefined.
getEdgesForNode(id)ReadonlySet<EntityId>All edge IDs connected to a node.
liveEdges()IterableIterator<[EntityId, TEdge]>All alive edges.
edgeCountnumberNumber of alive edges.

Traversal

MethodReturnsDescription
getNeighbors(id)IterableIterator<Neighbor>All neighbors of a node (in + out).
inNeighbors(id)IterableIterator<Neighbor>Neighbors with an edge pointing into id.
outNeighbors(id)IterableIterator<Neighbor>Neighbors id has an outgoing edge to.
degree(id)numberTotal edge count (in + out).
inDegree(id)numberNumber of incoming edges.
outDegree(id)numberNumber of outgoing edges.

Snapshot info

Method / PropertyReturnsDescription
currentSnapshotSnapshotIdThe snapshot at the cursor (-Infinity when empty).
entryCountnumberTotal log entries across all snapshots.
getLiveSnapshot(){ nodes, edges, events }Live nodes, edges, and events at the current snapshot.

On this page