I just realized that @mrjn’s note was just one step removed from the query I needed. For anyone else trying to do the same thing, the answer was to declare a reverse edge in the dgraph schema with:
mutation {
schema {
Class: uid @reverse .
}
}
And then to query on the class ID (<0xd59531fa5ba5372b>), like this:
{
Results (id: <0xd59531fa5ba5372b>) {
Entities: ~Class {
Name
Description
_uid_
}
}
}
Which then gives the desired result:
"Results": [
{
"Entities": [
{
"Description": "Consultant and developer",
"Name": "Jeff",
"_uid_": "0x3e8efeb24ba23885"
},
{
"Description": "Staff Accountant",
"Name": "David",
"_uid_": "0x67792fc1fb416676"
}
]
}
]