Re: totalItems with pagination and filtering

2015-11-14 20:09 GMT+01:00 Maik Riechert <maik.riechert@arcor.de>:

> After I sent the email I had the same thoughts and I agree, it makes more
> sense to browse through the filtered collection, especially because
> totalItems works then.

Yes, I agree that this makes most sense.

> I also thought about how to link to the unfiltered collection, that's tricky.

How about using the <http://www.iana.org/assignments/relation/up>
relation to describe this link?

> To help think about it, let's imagine we subclass Collection and use
> something like FilteredCollection which could then include some custom
> predicates like "appliedFilter": {"name": "Bob"}, and the link to the
> unfiltered collection which should be unambiguous.

That could absolutely work. But this again delves into the problematic
area of filtering, sorting, paging, etc., which I think is out of
scope for Hydra and which should be solved by external vocabularies
like OData Query Options.

-- 
Asbjørn Ulsberg           -=|=-        asbjorn@ulsberg.no
«He's a loathsome offensive brute, yet I can't look away»

Received on Wednesday, 18 November 2015 10:23:38 UTC