Closed jiqiang90 closed 1 year ago
I don't think so.
[semi-automated message] Thanks for your question. This doesn't currently seem to be a bug in the library so I'm going to close the issue, but please feel free to keep requesting help below and if it does turn out to be a bug we can definitely re-open it 👍
You can also ask for help in the #help-and-support channel in our Discord chat.
Summary
Allow order by with
totalCount
Additional context
I think this will expand on this issue https://github.com/graphile/pg-aggregates/issues/25
Currently we can filter with aggregate result, but not allow output to order by it.
For example, we have schema as follow:
And we want to sort authors by the amount of books written after a certain year.
With
pg-aggregates
andconnection-filter
I could query list of authors and books written after year 1995,However, the
BOOKS_COUNT_DESC
does not order by filtered result, it counts all books belong to author and order desc.Is there a generic solution for this? Rather than something like create additional plugin and make sortable on compute column. Thank you !