feat(core): Support executing single nodes not part of a graph as a partial execution (#13529)

This commit is contained in:
Danny Martini
2025-02-27 09:35:52 +01:00
committed by GitHub
parent 223ec2d9c9
commit 8a34f027c5
4 changed files with 135 additions and 15 deletions

View File

@@ -13,6 +13,12 @@ function findSubgraphRecursive(
) {
// If the current node is the chosen trigger keep this branch.
if (current === trigger) {
// If this graph consists of only one node there won't be any connections
// and the loop below won't add anything.
// We're adding the trigger here so that graphs with one node and no
// connections are handled correctly.
newGraph.addNode(trigger);
for (const connection of currentBranch) {
newGraph.addNodes(connection.from, connection.to);
newGraph.addConnection(connection);