Skip to content

v2.16.0 — Bidirectional Block Traversal

Choose a tag to compare

@2b3pro 2b3pro released this 16 Mar 16:12
· 12 commits to main since this release

What's New

roam_fetch_block_with_childrenroam_fetch_block — renamed with bidirectional traversal support.

New: Ancestor Chain Traversal

  • New include_ancestors parameter (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/parents pull pattern — single API call, no recursion
  • Combine with depth: 0 to fetch ancestors only (lightweight alternative to fetching entire page)

CLI

  • New -a, --ancestors flag on roam get for ancestor traversal from the command line
  • roam get abc123def -a — block + children + ancestors
  • roam get abc123def -a -d 0 — ancestors only, no children

Backward Compatible

  • Existing depth parameter and children behavior unchanged
  • Deprecated fetchBlockWithChildren() method kept as alias
  • Default behavior (no include_ancestors) returns identical output to v2.15.x