API Reference
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
import { explainPath } from "@graphrefly/ts/graph";
Signature
function explainPath(
snapshot: DescribeSnapshot,
from: string,
to: string,
options: ExplainPathOptions = {},
): CausalChain
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
A CausalChain value.
Example
import { explainPath } from "@graphrefly/ts/graph";
Source
packages/ts/src/graph/diagnostics.ts