workflow.graph.md
October 26, 2023 ยท View on GitHub
Home > @datashaper/workflow > Graph
Graph interface
Signature:
export interface Graph<T>
Properties
| Property | Modifiers | Type | Description |
|---|---|---|---|
| nodes | readonly | NodeId[] |
Methods
| Method | Description |
|---|---|
| add(node) | Add a node to the graph |
| clear() | Clears out the graph of all nodes, inputs, and outputs |
| hasNode(id) | Determines if the graph contains a node by id |
| node(id) | Retrieves a node by id. |
| remove(id) | Remove a node from the graph |
| validate() | Verify that the graph is a valid dag (no cycles) |