Hello guys,
I saw several posts without a final solution for this, so I would like to ask if it was implemented or if is there any way to filter a value inside a repeatable component.
Currently, I can use the filter to find the string I want, but the graphql returns all the component items instead of bringing only what is matching the search.
Thanks,
query($question: String) {
tests( filters: { faq: { question: { eq: $question } } } ) {
data{
attributes{
faq{
question
answer
}
}
}
}
}
QUERY VARIABLES
{
"question": "Q1"
}
Returns All items in the component, instead of only the “Q1”
{
"data": {
"tests": {
"data": [
{
"attributes": {
"faq": [
{
"question": "Q1",
"answer": "<p>A1</p>"
},
{
"question": "Q2",
"answer": "<p>A2</p>"
}
]
}
}
]
}
}
}