Graph Schema
Complete reference for noodlbox graph structure
Complete reference for all node types, relationships, and properties in the noodlbox knowledge graph.
Node Types
CodeSymbol
Represents code symbols: functions, classes, methods, variables, etc.
| Property | Type | Description |
|---|---|---|
id | SERIAL | Unique identifier |
name | STRING | Symbol name |
symbol_type | STRING | Type of symbol |
file_path | STRING | File location |
line_number | INT64 | Starting line |
end_line | INT64 | Ending line (optional) |
signature | STRING | Function signature (optional) |
Symbol Types:
FunctionClassMethodVariableConstantInterfaceTypeEnum
File
Source files in the repository.
| Property | Type | Description |
|---|---|---|
id | SERIAL | Unique identifier |
path | STRING | Relative path from repo root |
extension | STRING | File extension |
language | STRING | Programming language (optional) |
Community
Functional groupings detected by modularity analysis.
| Property | Type | Description |
|---|---|---|
id | SERIAL | Unique identifier |
label | STRING | Human-readable name |
cohesion | DOUBLE | Cohesion score (0-1) |
symbol_count | INT64 | Number of symbols |
Process
Execution flows through the codebase.
| Property | Type | Description |
|---|---|---|
id | SERIAL | Unique identifier |
label | STRING | Process name |
process_type | STRING | intra_community or cross_community |
step_count | INT64 | Number of steps |
Repository
Repository metadata.
| Property | Type | Description |
|---|---|---|
id | SERIAL | Unique identifier |
name | STRING | Repository name |
full_name | STRING | Full name (owner/repo) |
Relationship Types
CALLS
Function/method call relationships.
Direction: (caller:CodeSymbol)-[:CALLS]->(callee:CodeSymbol)
| Property | Type | Description |
|---|---|---|
call_count | INT64 | Number of calls (optional) |
Example:
MATCH (a:CodeSymbol)-[:CALLS]->(b:CodeSymbol)
WHERE a.name = "handleRequest"
RETURN b.nameCONTAINED_BY
Symbols contained in files.
Direction: (symbol:CodeSymbol)-[:CONTAINED_BY]->(file:File)
Example:
MATCH (s:CodeSymbol)-[:CONTAINED_BY]->(f:File)
WHERE f.path = "src/index.ts"
RETURN s.nameMEMBER_OF
Symbols belonging to communities.
Direction: (symbol:CodeSymbol)-[:MEMBER_OF]->(community:Community)
| Property | Type | Description |
|---|---|---|
centrality | DOUBLE | Importance in community (optional) |
Example:
MATCH (s:CodeSymbol)-[:MEMBER_OF]->(c:Community)
WHERE c.label = "Authentication"
RETURN s.nameSTEP_IN_PROCESS
Steps in execution processes.
Direction: (symbol:CodeSymbol)-[:STEP_IN_PROCESS]->(process:Process)
| Property | Type | Description |
|---|---|---|
step | INT64 | Step number in sequence |
Example:
MATCH (s:CodeSymbol)-[r:STEP_IN_PROCESS]->(p:Process)
WHERE p.label = "UserLogin"
RETURN s.name, r.step
ORDER BY r.stepBELONGS_TO
Files belonging to repositories.
Direction: (file:File)-[:BELONGS_TO]->(repo:Repository)
Example:
MATCH (f:File)-[:BELONGS_TO]->(r:Repository)
WHERE r.name = "my-app"
RETURN f.pathProperty Types
| Type | Description | Example |
|---|---|---|
STRING | Text data | "functionName" |
INT64 | Integer | 42 |
DOUBLE | Floating point | 0.85 |
BOOLEAN | True/false | true |
SERIAL | Auto-incrementing ID | 1 |
Indexes
The following properties are indexed for fast lookups:
CodeSymbol.nameCodeSymbol.file_pathFile.pathCommunity.labelProcess.labelRepository.name
Schema Queries
Get All Node Types
CALL db.nodeLabels()Get All Relationship Types
CALL db.relationshipTypes()Count Nodes by Type
MATCH (n)
RETURN labels(n)[0] as type, count(*) as countCount Relationships by Type
MATCH ()-[r]->()
RETURN type(r) as type, count(*) as countAccessing Schema via MCP
Use the Database Schema resource:
GET db://schema/{repository}Returns complete schema including all properties.
Related
- Cypher Queries - Query guide
- Database Schema Resource - Access via MCP
- Knowledge Graph - Conceptual overview