v2.16.0 — Bidirectional Block Traversal
What's New
roam_fetch_block_with_children → roam_fetch_block — renamed with bidirectional traversal support.
New: Ancestor Chain Traversal
- New
include_ancestorsparameter (default:false) returns the ancestor chain from any block up to the page root - Each ancestor includes UID, content string (or title for page root), and depth
- Uses Datomic
:block/parentspull pattern — single API call, no recursion - Combine with
depth: 0to fetch ancestors only (lightweight alternative to fetching entire page)
CLI
- New
-a, --ancestorsflag onroam getfor ancestor traversal from the command line roam get abc123def -a— block + children + ancestorsroam get abc123def -a -d 0— ancestors only, no children
Backward Compatible
- Existing
depthparameter and children behavior unchanged - Deprecated
fetchBlockWithChildren()method kept as alias - Default behavior (no
include_ancestors) returns identical output to v2.15.x