Skip to content
  1. API
  2. Types

TraversalOptions

Type: object

Properties

  • directed(optional) boolean[=false] Indicates if the graph should be considered as directed.
  • onEdge(optional) (edge: Edge<ED, ND>) => void | boolean Edge callback. Called for each edge in the traversal. If you return false, the edge will not be followed.
  • onNode (node: Node<ND, ED>) => void | boolean Node callback. Called for each node in the traversal. If you return true, the traversal is stopped, understanding that you have found what you were looking for.
  • root Node<ND,ED>|NodeId Traversal root - the node from which the traversal should start.