CodeGraph/docs
Section 7.3

Relationship Kinds & Edges

Technical specification of all 7 directed edge kinds and their structural invariants in the CodeGraph schema.

Source: server/src/graph/models/GraphEdge.ts

The `GraphEdge` Interface

server/src/graph/models/GraphEdge.ts
1
2
3
4
5
6
export interface GraphEdge { id: string; // Deterministic: sourceId:relationshipKind:targetId sourceId: string; // Prefixed source node ID targetId: string; // Prefixed target node ID relationshipKind: RelationshipKind; // "calls" | "imports" | "extends" | "implements" | ... }

Edge Semantics & Traversal Behavior

KindSource -> Target MeaningTraversed in Impact/Dependency?
"calls"Caller function -> Callee functionYes
"imports"Importing file -> Imported file/dep/moduleYes
"extends"Subclass -> SuperclassYes
"implements"Class -> Implemented InterfaceYes
"instantiates"Constructor caller -> Instantiated ClassYes
"exports"File -> Exported SymbolNo (Metadata edge)
"references"Type reference -> Target SymbolNo (Type metadata)