Graph Traversal
// BFS neighbourhood — center chunk + reachable neighbours within depth hopsconst neighborhood: GraphNeighborhood = await indexer.getNeighborhood(chunkId, { depth?: number, // default: 1 relationTypes?: RelationshipType[], // default: all limit?: number, // max neighbours; default: 20});
// Call graphconst callers: CodeChunk[] = await indexer.getCallers(chunkId);const callees: CodeChunk[] = await indexer.getCallees(chunkId);
// Import graphconst deps: CodeChunk[] = await indexer.getDependencies('src/auth.ts');const dependents: CodeChunk[] = await indexer.getDependents('src/auth.ts');
// Inheritanceconst implementors: CodeChunk[] = await indexer.getImplementors(chunkId);const superTypes: CodeChunk[] = await indexer.getSuperTypes(chunkId);
// Raw edge accessconst outgoing: GraphEdge[] = await indexer.getEdgesFrom(chunkId, types?);const incoming: GraphEdge[] = await indexer.getEdgesTo(chunkId, types?);See Knowledge Graph for the full list of RelationshipType values.