Some question with the example (

Almighty Friends,How do I get its owner by pet name?
This is the data example

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")) {
    owner: ~owns_pet {

1 Like

Thank you,

It turns out that dgraph has no attribute concept.

At the beginning of the design of the data model,I should locate the nodes and edges.

This can be searched according to various attributes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.