dgraphql icon indicating copy to clipboard operation
dgraphql copied to clipboard

Facets and Aggregation, and @count Option? How to.

Open MichelDiz opened this issue 7 years ago • 1 comments

https://tour.dgraph.io/intro/3/ Facets and Aggregation https://docs.dgraph.io/query-language/#facets-and-aggregation mutation {

  schema {
    name: string @index(exact, term) .
    age: int @index(int) .
    friend: uid @count .
    Reputation: int @index(int)
  }

If I need to count how many partners, children, parents or friends How to proceed? Using the Dgraph feature of counting. Cheers

MichelDiz avatar Oct 01 '17 19:10 MichelDiz

I noticed that DgraphQL does automatic indexing. And I figured out how to make friends. But the counting feature would be great.

friend: [Person] @reverse(name: "Person")

MichelDiz avatar Oct 02 '17 02:10 MichelDiz