GraphTopology
data class GraphTopology(val nodes: List<String>, val edges: List<GraphEdge>, val dynamicRoutes: Set<String>, val subgraphs: Map<String, GraphTopology> = emptyMap(), val forEachNodes: Set<String> = emptySet())
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
Properties
Link copied to clipboard
Link copied to clipboard
the nodes that run their work for each item of a list, added with the forEach of StateGraph.node. They are in nodes and edges like any other.
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
Link copied to clipboard
fun toMermaid(interruptBefore: Set<String> = emptySet(), interruptAfter: Set<String> = emptySet(), edgeLabels: Map<Pair<String, String>, String> = emptyMap()): String
Draws this graph as a Mermaid state diagram, which GitHub, GitLab and most documentation sites show as a picture in a code block of the language mermaid.