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

Method findPath

src/index.ts:3164–3170  ·  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

3162 * @returns Array of nodes and edges forming the path, or null if no path exists
3163 */
3164 findPath(
3165 fromId: string,
3166 toId: string,
3167 edgeKinds?: Edge['kind'][]
3168 ): Array<{ node: Node; edge: Edge | null }> | null {
3169 return this.traverser.findPath(fromId, toId, edgeKinds);
3170 }
3171
3172 /**
3173 * 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