pg_graphql
pg_graphql copied to clipboard
Support orderBy aggregates based on child tables
Describe the bug Support orderBy aggregates based on child tables
To Reproduce Steps to reproduce the behavior:
- just add order by to your query but you don't have an option to order by related tables (child table)
Expected behavior
Based from hasura

The most common operations are: count, max, min

other operations aside from: standard deviation and variance is: avg, sum

Another example is ordering POSTS by REACTIONS count
query MyQuery {
GroupContent_connection(order_by: {GroupContentReactions_aggregate: {count: desc}}) {
edges {
node {
id
GroupContentReactions_aggregate {
aggregate {
count
}
}
}
}
}
}
Hasura compatibility would be really wonderful.