i have much persons, each one haves a facet (“weight”)
Can I get the person who has the most weight?
Yes you can do it. With filters https://docs.dgraph.io/query-language/#filtering-on-facets
But it depends the way you’re doing the “weight”. In overall you will need to create a Var block. Within this find the desired weight and return your UID in the main query. Depending on your context you will do weight evaluation on reverse predicates. Or from parent to Child like this https://docs.dgraph.io/query-language/#assigning-facet-values-to-a-variable.
update: Check this https://docs.dgraph.io/query-language/#facets-and-variable-propagation
Sorry the link math-on-value-variables was wrong.