hasura / hasura/graphql-engine
group by
Open
Nobody has claimed this yet.
k/enhancement
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
Is your proposal related to a problem?
The ability execute group by queries via graphql. For example, I might want to get the average and min rating per month. Currently I need to create a view for every way I want to aggregate.
Describe the solution you'd like
query {
articles_aggregated(groupBy: ["author", "year(publish_date)"]) {
group
sum {
revenue
}
}
}
Describe alternatives you've considered
https://docs.directus.io/reference/query/#aggregation-grouping
If the feature is approved, would you be willing to submit a PR?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Start with the proposed articles_aggregated query and the linked Directus aggregation/grouping reference; done means GraphQL clients can group results by fields or expressions and receive the requested aggregates without creating a view for each grouping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, typescript
- Domain
- api, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100