I got doubt about @reverse edges

Hey @MichelDiz, I see that you are using Projeto_Owner predicate for traversing the relationship in both directions which is not how it works. You should use ~Projeto_Owner to traverse in reverse direction. I will illustrate with an example.

child: uid @reverse .
set {
  _:f <name> "Father" .
  _:f <child> _:c .
  _:c <name> "Child" .

Then if I started with the father, the query would be

{
  me(func: uid(father_id)) {
    name
    child {
      name
    }
}

If I started with child, the query would be

{
  me(func: uid(child_id)) {
    name
    ~child {
      name
    }
}
2 Likes