datocms / product-roadmap

This project is now discontinued. For feature requests, please use our community forum.
https://community.datocms.com/
19 stars 1 forks source link

add a list of IDs to _all[Model]sMeta #144

Closed lunelson closed 5 years ago

lunelson commented 5 years ago

I've run in to a blocker, trying to get a filtered, paginated list of items in a randomized order.

If the _all[Model]sMeta would return an array of IDs in addition to the count parameter, there would be more possibilities: for example I could shuffle and paginate that list of IDs manually then use it in a second query's filter, simply matching against ID.

Although I can understand the pagination limit of 100 for regular queries, a simple list of matched IDs on the meta query would be quite low-bandwidth. I hope you'll consider implementing it.

stefanoverna commented 5 years ago

It's not an easy task for multiple reasons.. we won't work on this in the foreseeable future, sorry :( I might suggest creating a field with a plugin that generates random values to records? And then you can sort by that field?