Understanding Graphify node identifiers — formats, resolution, and usage in queries.
Understanding Graphify node identifiers — the keys to querying, explaining, and tracing your codebase.
A Node ID is a unique identifier for any node in the Graphify knowledge graph. Every file, function, class, variable, and symbol gets a Node ID.
| Format | Example | Resolves To |
|---|---|---|
| File path | scripts/dictionary/yt-to-content-v2.py | File node |
| File + line | scripts/dictionary/yt-to-content-v2.py:L100 | Symbol at line 100 |
| Symbol name | mergeParams | Function/class by name |
| Qualified symbol | scripts/dictionary/yt-to-content-v2.py:mergeParams | Specific symbol in file |
| Class.method | Config.load | Method on class |
graphify explain 1# File (shows all symbols, imports, structure)
2graphify explain scripts/dictionary/yt-to-content-v2.py
3
4# Specific function
5graphify explain mergeParams
6
7# Qualified (disambiguates same-name functions)
8graphify explain scripts/dictionary/yt-to-content-v2.py:mergeParams
9
10# Line-specific
11graphify explain scripts/dictionary/yt-to-content-v2.py:L100
graphify path1# File to file
2graphify path tasks/content.yaml scripts/dictionary/yt-to-content-v2.py
3
4# Function to file
5graphify path mergeParams scripts/dictionary/yt-to-content-v2.py
6
7# Qualified to file
8graphify path scripts/dictionary/yt-to-content-v2.py:mergeParams tasks/content.yaml
graphify query1# Natural language (Graphify resolves internally)
2graphify query "explain the mergeParams function"
3graphify query "what does scripts/dictionary/yt-to-content-v2.py do?"
scripts/dictionary/yt-to-content-v2.py
→ Resolves to file node if exists in graph.
mergeParams
→ Finds all symbols named mergeParams. If multiple, shows all.
scripts/dictionary/yt-to-content-v2.py:mergeParams
→ Exact match: symbol mergeParams in that specific file.
scripts/dictionary/yt-to-content-v2.py:L100
→ Symbol at or near line 100 in that file.
1# ❌ Ambiguous (multiple parse_args in codebase)
2graphify explain parse_args
3
4# ✅ Precise
5graphify explain scripts/dictionary/yt-to-content-v2.py:parse_args
1# ✅ Good for "how does this file work?"
2graphify explain scripts/dictionary/yt-to-content-v2.py
3
4# ✅ Good for "what's in this module?"
5graphify explain scripts/dictionary/
1# ✅ Good for "where is this function used?"
2graphify query "what calls mergeParams?"
3
4# ✅ Good for "show me the function"
5graphify explain mergeParams
1graphify query "what calls mergeParams?"
2# Output includes: "scripts/dictionary/yt-to-content-v2.py:mergeParams"
1graphify explain scripts/dictionary/yt-to-content-v2.py
2# Output lists: mergeParams (L121), parse_args (L138), etc.
1graphify path A B
2# Output shows intermediate node IDs
graphify-out/graph.html| Type | ID Pattern | Example |
|---|---|---|
| File | path/to/file.py | scripts/dictionary/yt-to-content-v2.py |
| Function | file.py:function | scripts/dictionary/yt-to-content-v2.py:mergeParams |
| Class | file.py:Class | scripts/dictionary/yt-to-content-v2.py:Config |
| Method | file.py:Class.method | scripts/dictionary/yt-to-content-v2.py:Config.load |
| Variable | file.py:VAR | scripts/dictionary/yt-to-content-v2.py:ARGS |
| Import | file.py:import:module | scripts/dictionary/yt-to-content-v2.py:import:argparse |
| Issue | Solution |
|---|---|
| “Node not found” | Check spelling; use graphify query to find correct ID |
| Multiple matches | Use qualified ID: file.py:symbol |
| Line reference wrong | Line numbers shift; use symbol name instead |
| Symbol not in graph | Rebuild: graphify update . --code-only |