Home > @datashaper/workflow > Graph
Signature:
export interface Graph<T> | Property | Modifiers | Type | Description |
|---|---|---|---|
| nodes | readonly |
NodeId[] |
| 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) |