aggregates of list with various filters
I know there are
But so far, aggregates work somewhat only on a "row"-level of a resource (hope I got that correct)
Is there an easy way to support on "resource"-level?
example:
- resource: offer
- attribute: price
i have a list of offers that we fetch via GraphQL.
What's the easiest way to display a sum of all offers?
The tricky part is: we allow different filters to be applied to the list. these filters should also be applied when calculating the sum.
Examples:
So, I'm thinking of something like:
IMHO, the important part is to accept the same
Perhaps there's already something like this available and I'm simply finding it.
What would be the best way?
I already asked Gemini but it lied to me
Thanks a lot in advance!
aggregates and have worked with them already.But so far, aggregates work somewhat only on a "row"-level of a resource (hope I got that correct)
Is there an easy way to support on "resource"-level?
example:
- resource: offer
- attribute: price
i have a list of offers that we fetch via GraphQL.
What's the easiest way to display a sum of all offers?
The tricky part is: we allow different filters to be applied to the list. these filters should also be applied when calculating the sum.
Examples:
So, I'm thinking of something like:
IMHO, the important part is to accept the same
OfferFilterInput as the offers-list query, which would then reduce a lot of additional code on our side.Perhaps there's already something like this available and I'm simply finding it.
What would be the best way?
I already asked Gemini but it lied to me
Thanks a lot in advance!
