> ## Documentation Index
> Fetch the complete documentation index at: https://docs.graphify.com/llms.txt
> Use this file to discover all available pages before exploring further.

# graphify path

> Trace the shortest relationship path between two graph concepts.

```bash theme={null}
graphify path "<source>" "<target>" [--graph <path>] [--directed | --undirected]
```

| Argument          | Meaning                                                |
| ----------------- | ------------------------------------------------------ |
| Source and target | Node labels, IDs, or matching keywords.                |
| `--graph`         | Use a specific JSON graph.                             |
| `--directed`      | Respect stored direction; this is the current default. |
| `--undirected`    | Explore connectivity while ignoring direction.         |

The direction flags are mutually exclusive.

```bash theme={null}
graphify path "login" "normalize_email"
graphify path "normalize_email" "login" --undirected
```

These examples use the [tutorial project](/guides/first-graph). In another repository, use its actual labels or IDs.

## Interpret the path

Follow each relationship and check its evidence. A source-level path does not prove that a particular runtime input executes it. An absent path can mean missing or unresolved relationships; it does not prove independence.

For the MCP version, use `shortest_path`. Its inputs additionally expose `max_hops`; see the [MCP reference](/reference/mcp-tools).

<div aria-hidden="true" className="hidden [body:has(&)_.chat-assistant-floating-input::before]:!bg-transparent" />

<div role="navigation" aria-label="Documentation pages" className="not-prose mt-12 grid gap-4 sm:grid-cols-2">
  <a href="/reference/query" rel="prev" aria-label="Previous: graphify query" className="group flex min-h-[112px] flex-col justify-center gap-3 rounded-xl border border-[#c7dbd0] !border-b-[#c7dbd0] bg-[#ffffff] px-6 py-5 text-[#062314] no-underline transition-colors hover:border-[#94b6a2] hover:bg-[#edf6f0] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#4dea9c] items-start text-left"><span className="flex items-center gap-2 text-[11px] font-medium uppercase tracking-[0.08em] text-[#586b60]"><svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" aria-hidden="true"><path d="M15 5l-7 7 7 7" /></svg>Previous</span><span className="text-[15px] font-semibold leading-6">graphify query</span></a>
  <a href="/reference/explain" rel="next" aria-label="Next: graphify explain" className="group flex min-h-[112px] flex-col justify-center gap-3 rounded-xl border border-[#c7dbd0] !border-b-[#c7dbd0] bg-[#ffffff] px-6 py-5 text-[#062314] no-underline transition-colors hover:border-[#94b6a2] hover:bg-[#edf6f0] focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-[#4dea9c] items-end text-right sm:col-start-2"><span className="flex items-center gap-2 text-[11px] font-medium uppercase tracking-[0.08em] text-[#586b60]">Next<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.8" aria-hidden="true"><path d="M9 5l7 7-7 7" /></svg></span><span className="text-[15px] font-semibold leading-6">graphify explain</span></a>
</div>
