Check aggregate data in Dgraph Cloud

I have used other GraphQL schemas that provide an aggregate query to check things like count, average, min, max etc however I can’t see an option for that in the DgraphQL queries. Is this a feature that is coming in the future?

My most common two uses cases is finding if an item already exists (which I could do without using an aggregated query however multiple IDs are not supported in Dgraph Cloud) and seeing the count of items in a query response.

Here is an example of Hasura’s aggregation queries - Postgres: Aggregation queries | Hasura GraphQL Docs

I’d let @minhaj talk about that feature in Dgraph’s GraphQL. But, you could always run DQL to get counts. You can specify in your GraphQL schema to run a custom DQL query.

Oh strange… in the dashboard I can now see an aggregate query for each of my types! I am not too sure why this was not there before :man_shrugging:t3:

1 Like