Hi,
I'm getting an error when trying to order using the query method in Nuxt 2.
{"type":"api_parsing_error","message":"']' expected but 'a' found on line:1 col:27 in query '[[at(document.type, \"book\")][at(my.book.subjects.subject, \"YIQbLBEAACUAbI2q\")]]'\n[[at(document.type, \"book\")][at(my.book.subjects.subject, \"YIQbLBEAACUAbI2q\")]]\n ^\n","pos":{"line":1,"column":27,"location":"ordering"}}
The code I'm using:
const books = await $prismic.api.query(
[
$prismic.predicates.at('document.type', 'book'),
$prismic.predicates.at('my.book.subjects.subject', doc.id)
],
{
orderings: '[my.book.author_last_name asc]'
}
)
That query works without the params object, just with predicates.
I also tried to use object-type orderings with field and direction keys, and have the same issue.
I'm using the same query call for other custom type and it's working, so something is wrong about this custom type? The only difference is right before I'm doing another call:
const doc = await $prismic.api.getByUID('subject', params.slug)
Thank you in advance.