I’m trying to find a way to get a total count of all the nodes and all the edges in my graph.
I tried something like
counting(func: has(dgraph.type)) {
a as uid
b as predicate1
c as predicate2
d as math(a+b)
}
result () {
node_total: count(a)
edge_total: count(d)
}
but the query never returns.
If I remove the math on the predicates and just count uids then the query returns in about 10 minutes which isn’t great.
Is there no other way to get counts of nodes and edges? I’ve looked at the metrics and debug output but those don’t have what I’m looking for.