hasura / hasura/graphql-engine

Support for GROUP BY/HAVING

Open
#10,210 0 comments 3 reactions 0 assignees View on GitHub
k/enhancement
Dominant language
TypeScript
Stars
32.1k
Forks
3k
PR merge metrics
PR metrics pending

Description

### Component

GraphQL Engine

### Is your proposal related to a problem?

Currently running into a situation with row group using ag-grid where a solution is needed for getting the counts of an unknown set of columns.

```
SELECT state, category, count(*)

WHERE state = 'COMPLETED'

GROUP BY state, category;
```

The view method won't work because the list of columns in the group by is dynamic based on what columns the user decides to group.

### Describe the solution you'd like

Add GROUP BY/HAVING

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by reviewing the GraphQL Engine's existing view method and how it handles dynamic column selections; define how GROUP BY and HAVING should support ag-grid's unknown grouping columns, with completion demonstrated by coverage for the requested query behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
graphql, sql
Domain
api, database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.