Find All Nodes And Edges

To get all nodes count:

query {
  counter(func: has(dgraph.type)) {
    count(uid)
  }
}

Edges are facets in dgraph, so you need to use the @facet directive

https://dgraph.io/docs/query-language/facets/

and more on counters:

https://dgraph.io/docs/query-language/count/

For specific questions, I suggest you get on the discord to get a quick answer:

J

1 Like