(
repo: &Repository,
node_id: &str,
depth: u8,
)
| 1175 | // --------------------------------------------------------------------------- |
| 1176 | |
| 1177 | pub fn neighbors_impl( |
| 1178 | repo: &Repository, |
| 1179 | node_id: &str, |
| 1180 | depth: u8, |
| 1181 | ) -> Result<(Vec<KgNode>, Vec<KgEdge>), Status> { |
| 1182 | let mut subgraph = repo |
| 1183 | .vault_kg_neighbors(node_id, depth) |
| 1184 | .map_err(repository_error)?; |
| 1185 | repo.enrich_workflow_usage(&mut subgraph.nodes) |
| 1186 | .map_err(repository_error)?; |
| 1187 | let nodes = subgraph.nodes.into_iter().map(kg_node_proto).collect(); |
| 1188 | let edges = subgraph.edges.into_iter().map(kg_edge_proto).collect(); |
| 1189 | Ok((nodes, edges)) |
| 1190 | } |
| 1191 | |
| 1192 | /// Domain KG node → wire, with the FULL field set (add-only source and |
| 1193 | /// metadata) so the client serializes the same JSON shape the local body |
no test coverage detected