explainPath()
Explain the shortest describe-edge path from from to to.
This is the rich companion to Graph.describe({ explain }): it reports found/no-path
status and per-hop metadata, but remains a pure helper over the snapshot.
Import
Section titled “Import”import { explainPath } from "@graphrefly/ts/graph";Signature
Section titled “Signature”function explainPath( snapshot: DescribeSnapshot, from: string, to: string, options: ExplainPathOptions = {},): CausalChainParameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
snapshot | DescribeSnapshot | snapshot value used by the helper. |
from | string | from value used by the helper. |
to | string | to value used by the helper. |
options | ExplainPathOptions | Options that configure the helper. |
Returns
Section titled “Returns”A CausalChain value.
Example
Section titled “Example”import { explainPath } from "@graphrefly/ts/graph";Source
Section titled “Source”packages/ts/src/graph/diagnostics.ts