0
type Species {
    name: String! @id
    animals: [Animal!]! @hasInverse(field: species)
}

type Animal {
    name: String!
    species: Species!
}

How do I make animal name unique within species? So that I can allow only one dog named Bob, but also one cat with the same name.

beardeadclown
  • 327
  • 2
  • 14

1 Answers1

0

Apparently there is already a similar thread on the Dgraph forum: https://discuss.dgraph.io/t/composite-id-fields/13337

beardeadclown
  • 327
  • 2
  • 14