getParent()
getParent(
graph,nodeId):ExecutionNode|undefined
Defined in: graph-query.ts:62
Get the parent of a node.
Parameters
| Parameter | Type | Description |
|---|---|---|
graph | ExecutionGraph | The execution graph to search. |
nodeId | string | The child node ID. |
Returns
ExecutionNode | undefined
The parent node, or undefined if root or not found.
Example
const parent = getParent(graph, toolId);