Content Relationship predicates matching a specific value

Hey!

I have a question regarding building predicates.

I have a custom type productPage which has a group field of Content Relationship to my other custom type articles. So a product can have linked many articles.

I'm trying to build a filter right now. I want to filter for products where the articles of it have specific values.

I know that I can have a predicate to get the content relationship:
predicates: [prismic.predicate.at('my.product-page.articles.article', articleID])

But what I want is something more specific like this (which doesn't work):
predicates: [prismic.predicate.at('my.product-page.articles.article.color', 'blue']

Is this possible?

Hello @marco3

Thanks for reaching out to us.

Currently, there is no predicate available that can do that. Alternatively, you can get all the article content relationships from the product, and then write the customized function to filter the required ones from the result of the query.

Let me know if you have any questions.

Thanks,
Priyanka