Filtered collections and metadata

Hey there, Probably a too simple question, but I can’t find any definitive argument on this:

When I’m fetching all my Stuff instances, the metadata contains a total of (say) 42. Based on that and other metadata, paginating is pretty easy.

When I’m fetching all my Stuff where { name: "Bob"} (17 results), what should be the value of metadata.total ? 42 or 17 ?

  • If it’s 42, then how do I know how many elements are in my query, and so how can I paginate ?
  • If it’s 17, then the metadata for the type Stuff is now wrong.

I’m pretty sure I got something wrong, but I couln’t wrap my mind around this particular issue…

Thank you all