pub fn load_unified_graph(
root: &Path,
config: &GraphLoadConfig,
) -> Result<CodeGraph>Expand description
Load a unified code graph using the new Arena+CSR storage architecture.
This is the preferred entry point for CLI graph operations. It loads a graph either from a persisted snapshot or by building from source files.
§Loading Strategy
- First tries to load from persisted snapshot (
.sqry/graph/snapshot.sqry) - If no snapshot exists, builds from source files using language plugins
§Arguments
root- Root directory to scan for source filesconfig- Configuration for file walking (hidden files, symlinks, depth)
§Returns
A CodeGraph populated with nodes and edges from all supported languages
§Errors
Returns an error if the path is missing, the snapshot is invalid, or the graph build fails.
§Example
ⓘ
use std::path::Path;
use sqry_cli::commands::graph::loader::{load_unified_graph, GraphLoadConfig};
let config = GraphLoadConfig::default();
let graph = load_unified_graph(Path::new("."), &config)?;