Take any 1:N relationship (e.g. father and child). What’s the recommended way of fetching all fathers with at least one child?
There is none; JSON:API is agnostic with regards to filtering strategies (but does have some recommendations).
You could have a boolean filter[hasAtLeastOneChild]
parameter, or filter[childCount]=>0
, or whatever else you can come up with. Filters do not necessarily have to correspond to attributes/relationships (though it’s always nice if they do).