Relations can be used for sorting. So should not be a problem to reuse the code to sort by aggregated values. Also, would be good limit avaialable functions for each type (inspired by https://github.com/nuwave/lighthouse/issues/2487).
Probably the best/easy way is to add a new extra operator aggregate. Need to think how it should look, especially if we want type filtering.
Relations can be used for sorting. So should not be a problem to reuse the code to sort by aggregated values. Also, would be good limit avaialable functions for each type (inspired by https://github.com/nuwave/lighthouse/issues/2487).
Probably the best/easy way is to add a new extra operator
aggregate
. Need to think how it should look, especially if we want type filtering.https://www.db-fiddle.com/f/7DpjCeQyNMUTXx6gTHCRVv/0