Skip to main content


Graph query syntax

  1. The general syntax of a graph traversal in ArangoDB is as follows:

    for vertex[, edge[, path]]
    in [min[..max]]
    outbound|inbound|any startVertex
    edgeCollection[, more…]
  2. for emits upto three variables

  • vertex (object): the current vertex in a traversal
  • edge (object, optional): the current edge in a traversal
  • path (object, optional): representation of the current path with two members:
  • vertices: an array of all vertices on this path
  • edges: an array of all edges on this path
  1. in min..max defines the minimal and maximal depth for the traversal. If not specified, min defaults to 1, and max defaults to min

Graph traversal depth

  1. outbound|inbound|any defines the direction of your search

Graph traversal direction

  1. startVertex defines the node from which the traversal should begin

  2. edgeCollection: one or more names of collections holding the edges that we want to consider in the traversal (anonymous graph)

Help us improve

Anything unclear or buggy in this tutorial? Provide Feedback