MCPcopy
hub / github.com/FlowiseAI/Flowise / walkGraph

Function walkGraph

packages/server/src/utils/index.ts:236–242  ·  view source on GitHub ↗
(nodeId: string)

Source from the content-addressed store, hash-verified

234
235 // Assuming that this is a directed acyclic graph, there will be no infinite loop problem.
236 const walkGraph = (nodeId: string) => {
237 const depth = depthQueue[nodeId]
238 graph[nodeId].flatMap((id) => {
239 depthQueue[id] = Math.max(depthQueue[id] ?? 0, depth + 1)
240 walkGraph(id)
241 })
242 }
243
244 walkGraph(endNodeId)
245

Callers 1

getStartingNodesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected