Graph Traversal/Traversal Steps

Traversals from Nodes

Once you’ve selected your starting points, these operations allow you to navigate through the graph.

The Idea

HelixQL is strongly typed. That means it stops you traversing edges or accessing properties that don’t exist.

Out

Get the nodes connected by outgoing edges of specific type.

::Out<EdgeType>

Example:

QUERY get_user_following(userID: ID) =>
    following <- N<User>(userID)::Out<Follows>
    RETURN following

IN

Get the nodes connected by incoming edges of specific type.

::In<EdgeType>

Example:

QUERY get_user_followers(userID: ID) =>
    followers <- N<User>(userID)::In<Follows>
    RETURN followers

OutE

Get the edges connected by outgoing edges of specific type.

::OutE<EdgeType>

Example:

QUERY get_following_details(userID: ID) =>
    following <- N<User>(userID)::OutE<Follows>
    RETURN following

InE

Get the edges connected by incoming edges of specific type.

::InE<EdgeType>

Example:

QUERY get_followers_details(userID: ID) =>
    followers <- N<User>(userID)::InE<Follows>
    RETURN followers

On this page