Querying for nodes without any friends

Hi Arthur,
I’m newbie with Dgraph and I’m not sure if this solution is scale to a million nodes.
My schema is:

isA: string @index(hash) .
friend: uid @count .

Than I could find all persons without friend with this query:

{
  nofriends(func: eq(isA,"Person")) @filter(NOT has(friend)) {
    uid
    name@.
    age
  }
}