MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / findPath

Method findPath

src/index.ts:3264–3270  ·  view source on GitHub ↗

* Find the shortest path between two nodes * * @param fromId - Starting node ID * @param toId - Target node ID * @param edgeKinds - Edge types to consider (all if empty) * @returns Array of nodes and edges forming the path, or null if no path exists

(
    fromId: string,
    toId: string,
    edgeKinds?: Edge['kind'][]
  )

Source from the content-addressed store, hash-verified

3262 * @returns Array of nodes and edges forming the path, or null if no path exists
3263 */
3264 findPath(
3265 fromId: string,
3266 toId: string,
3267 edgeKinds?: Edge['kind'][]
3268 ): Array<{ node: Node; edge: Edge | null }> | null {
3269 return this.traverser.findPath(fromId, toId, edgeKinds);
3270 }
3271
3272 /**
3273 * Get ancestors of a node in the containment hierarchy

Callers 1

graph.test.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected