Skip to main content
Guide
Traversal operations consume the current stream and produce the next stream. The label is optional. Rust takes Some("FOLLOWS") or None; Rust and Python spell the incoming step in_. Steps for named results, paths, and per-row values: Without a projection, rows with a visible path or sack return {"current": ..., "bindings": ..., "path": ..., "sack": ...} instead of {"$id": ...}.

Follow a named result

Preserve correlated values

A traversal normally forgets where it has been: after out(...), each row holds only the node it reached. Use bind to name a point in the traversal so each result row keeps a value from it. This request returns one row per service and the workload it routes to:
Bindings are row-local, so each row pairs a workload with the service that reached it rather than joining unrelated paths. Cypher pattern variables, such as s in the Cypher tab, stay bound for the whole row in the same way, so the statement needs no bind step. Branches can bind optional values and coalesce them during projection; see Project correlated bindings. After bind, end the traversal with projectBindings or projectDistinctBindings. valueMap, project, values, id, label, edgeProperties, orderBy, repeat, and choose fail with invalid_after_bind_operation. Write batches cannot use bind.

Branch traversals in Go

Go’s branch builder helix.Sub() offers only Out, In, Both, Where, Limit, Count, and Bind. For any other step, build the branch from a traversal’s steps: helix.SubTraversalFromSteps(helix.G().OutE("WROTE").OutN().Steps()).

Avoid accidental path growth

  • Filter as close to the source as possible.
  • Use a label on relationship steps when the schema provides one.
  • Add dedup() when multiple paths can reach the same entity.
  • Bound recursive traversal with a maximum depth; see Repeat a traversal.
  • Project only the fields needed by the caller.

Next steps

Project response rows

Shape current values and named bindings.

Branch and repeat

Compose optional, union, choose, and repeat operations.