Skip to main content
Guide
sub() starts an inline traversal that consumes the current stream. Use it for branching operations; use g() only for a top-level traversal entry.

Branching operations

Retain row-local values

Bind the starting service, use optional and union sub-traversals to bind each candidate workload path, then use projectDistinctBindings with coalesce to produce one stable row shape. See projections.

Gate later entries

Batch conditions refer to earlier entry results: Create the user entry, then add posts with varAsIf / var_as_if and a varNotEmpty("user") condition. Conditions serialize inside the named entry, not as a separate step.

Bound recursive work

Recursive and fan-out operations must have application-level bounds. Prefer explicit depth, candidate, and response limits. A response limit does not necessarily bound all work performed before that operation.

Next steps

Projection and bindings

Emit stable rows from correlated paths.

Parameters

Bind values and bounds at request time.