algorithms

algorithms.bfs

bfs(options: BFSTraversalOptions): TraversalResult

Traverse the graph breadth-first from a given start node.

Runs synchronously on the main thread. Not undoable; does not modify the store or emit events.

optionsBFSTraversalOptionsBFSTraversalOptions including the start node id and an optional visitor callback / max-depth limit.

Returns: TraversalResult