Related filtering based on the sum of a relationship models fields
So I'm wondering, with the new related model filtering, can I pass a filter where it does a greater/less than or equal to the sum of a related models fields.
So for example I want to gather products where the total inventory (sum of all its variants inventory quantity) is greater than 0 or less than 10.
Currently my only way to do this is fetch all the products which contain a computed field with
sum(variants.inventoryQuantity)
sum(variants.inventoryQuantity)
, but obviously we can't do a filter on computed fields as of the moment.