Some question with the example (https://tour.dgraph.io/schema/2/)

You add a reverse edge on owns_pet by doing the following schema alter operation.

owns_pet: uid @reverse

Then you search for the pet and traverse the reverse edge to the owner.

{
  pet(func: eq(name, "Goldie")) {
    name
    owner: ~owns_pet {
      name
    }
  }
}

1 Like