Dgraph DQL Tour
Edges are directional. A query can’t traverse an edge in reverse.
There are two choices to query in both directions
Add the reverse edge to the schema and add all the reverse edge data.
Tell Dgraph to always store the reverse edge using the
@reversekeyword in the schema.
Run the schema mutation and Dgraph will compute all the reverse edges. The
reverse edge of
In terms of data modeling, some reverse edges always make sense, such as
friend. Others, such as
boss_of, are sometimes, but not always