@selmeci that was pretty helpful thanks. My query is now:
{
nameswithoutfriends(func: has(name)) @filter(NOT has (friend)) {
name@.
age
}
}
After adding friend: uid @count . to the schema.
Looks like dgraph is a good fit, looking forward to getting more familiar with it.