I do something like that.
{
var(func: type(Human)){
u as uid
v as graph(
pagerank(
edges:[follow]
))
}
q(func: uid(u)){
uid
val(v)
}
}
In the part v as graph( pagerank( edges:[follow] ))
,it’s a go plugin add to dgraph alpha.
It need modify the source of dgraph gql parser, and develop your own algo plugin.