Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
MichelDiz opened this issue Oct 1, 2017 · 1 comment
Open

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

MichelDiz opened this issue Oct 1, 2017 · 1 comment

Comments

@MichelDiz
Copy link

MichelDiz commented Oct 1, 2017

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 MichelDiz changed the title @count Option? How to. Facets and Aggregation, "Reputation: int @index(int)" and @count Option? How to. Oct 1, 2017
@MichelDiz MichelDiz changed the title Facets and Aggregation, "Reputation: int @index(int)" and @count Option? How to. Facets and Aggregation, and @count Option? How to. Oct 1, 2017
@MichelDiz
Copy link
Author

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant