GraphTopology

data class GraphTopology(val nodes: List<String>, val edges: List<GraphEdge>, val dynamicRoutes: Set<String>, val subgraphs: Map<String, GraphTopology> = emptyMap())

The structure of a compiled graph: its nodes and the edges between them. Read it from CompiledGraph.topology to draw the graph or to check it in a test.

Constructors

Link copied to clipboard
constructor(nodes: List<String>, edges: List<GraphEdge>, dynamicRoutes: Set<String>, subgraphs: Map<String, GraphTopology> = emptyMap())

Properties

Link copied to clipboard

the nodes whose conditional edge declares no targets. Such a node can route to any node or to END, so it has no entries in edges.

Link copied to clipboard

every edge that is known before the graph runs: the static edges, the declared targets of conditional edges, and an edge to END for each node that has no outgoing edge.

Link copied to clipboard

the node names in the order they were added, without START and END.

Link copied to clipboard

the structure of the graph that a node added with StateGraph.subgraph runs, by the name of that node. The node is in nodes and edges like any other.

Functions

Link copied to clipboard

The nodes (or END) that node can lead to according to edges.