Hello,
I'm using "@prismicio/client": "^7.1.0"
and I would like to know if it's possible to filter on content relationship nested field.
Example:
I have two custom types: article and category.
- article.category is a content relationship field
- category.mysubfield = "a" | "b" | "c"
I would like to use client.getByType
with a filters options like this:
filters: [filter.any("my.article.category.mysubfield", ["a", "b"])]
I've also tried to preload the categories and use an array of IDs, with in or any operator, but didn't work either:
filters: [filter.in("my.article.category", categories.map(({ id }) => id))]
ps: I'm well aware of Content Relationship - Documentation - Prismic and @prismicio/client Technical Reference - Documentation - Prismic
Thank you for your time,
Raphael