Edges may appear under "links" or "edges" — both are supported.
Edges are indexed three ways: a symmetric adjacency (undirected, default Direction::Both),
a forward index (source→target = caller→callee, Direction::Out), and a reverse index
(callee→caller, Direction::In). Traversal selects the index via [Direction].
Read-only graph reader. Builds an in-memory adjacency index from a Graphify JSON value. Construction is O(N + E). Queries are O(N + E) worst case for full BFS.
Construct from a parsed serde_json::Value. Returns [GraphifyReaderError::MissingNodes] if the "nodes" key is absent or not an array.
from_ref
Construct by borrowing a parsed serde_json::Value. Identical to [Self::from_value] but leaves the input intact, so a caller that must retain the raw Value (for example to serve a lexical search) does not have to clone it. The graph is ~126 MB in this repo, so that clone is the difference between ~650 MB and ~1.15 GB of peak commit.
node_count
Total number of nodes in the graph.
edge_count
Total number of undirected edges (each edge counted once). Assumption: The source graph.json contains no duplicate directed edges. If the same {source, target} pair appears more than once in the links array, this count will be inflated (each duplicate pair adds 2 to the adjacency sum). Graphify’s own export format does not produce duplicates, so this is safe in practice.
bfs_from_seeds
BFS from one or more seed node IDs up to max_depth hops. direction selects callees ([Direction::Out]), callers ([Direction::In]), or the legacy undirected neighborhood ([Direction::Both]).
shortest_path
Shortest path between two node IDs (BFS). Returns None if unreachable.
god_nodes
Nodes sorted by degree (highest first), capped at top_n. Returns (node_id, degree) pairs.
community_members
All node IDs belonging to community_id (matched on the "community" node field).
graph_digest
BLAKE3 hex digest of graph bytes. The single source of truth for graph_json_sha256 (rebuild) and lexical_ingest_sha256 (ingest) so lexical_lag comparisons are valid.