Thanks for posting this question. Fields are specific to Custom Types, so you can't order by fields in the API.
Alternatively, I would suggest a workaround:
You can query multiple Custom Types with the
any predicate. Then, in your code, you can sort the results with
The downside is that, if you have more than 100 matching documents, you'll need to perform a recursive query to fetch them all. However, v6 of
@prismicio/client is currently in alpha, and it has a
getAll method, which performs a recursive function. So, you could do something like:
predicates: prismic.predicate.any(["type-a", "type-b", "type-c"])
That will return an array of all documents of Type A, Type B, and Type C, which you can sort.
The beta documentation for the v6 package will be out in the coming days.