Order of documents not working when using in predicate


I'm trying to retrieve a list of documents by id using the in predicate. Based on the docs here Rest API Technical Reference - Prismic the order of the documents should be the same as the order in the in array.

This is how I'm doing the query

const categories = await client.query(
    Prismic.Predicates.at("document.type", "category"),
    Prismic.Predicates.in("document.id", [

And this is the order of the ids I get back

  "🚀 ~ categories.results",
  categories.results.map(({ id }) => id)

🚀 ~ categories.results [

As you can see the order of the ids is completely different than the order given.

By the way I'm still using v5

Thank you!

Hello @levijesica

Thanks for reaching out to us.

in predicates returns the documents in the same order as the given array. Have you tested it in the API browser?


yes I did, and it does the same thing

Hello @levijesica

Could you please share the screenshot of the Api browser and the prismic repo name?