I have a page, which uses a collection named blocks
(Many-to-Any). Each of these blocks has multiple translated fields - so another relation called translations
.
In my SDK-Api, I want to filter those translations to only return the results in the correct locale.
{
// page
id: 2,
blocks: [
// blocks collection
{
id: 1,
landing_id: 2,
collection: "block_hero",
item: {
id: 1,
translations: [
{
id: 1,
block_hero_id: 1,
languages_code: "de-de",
title: "German title"
},
{
id: 2,
block_hero_id: 1,
languages_code: "en-us",
title: "English title"
}
]
}
}
]
}
I already tried this, but it doesn’t work:
{
deep: {
blocks: {
item: {
translations: {
_filter: {
languages_code: {
_eq: "en-us"
}
}
}
}
}
}
}
All language versions are returned.
How do Filter for page.blocks.item.translations.languages_code === "en-us"
?
Thank you!