System Information
- Strapi Version: 3.4.5
I cannot seem to make this work to query a relational field using AND logic.
I have 2 collections: Articles, Keywords
Articles have has many
relation to Keywords. I’m trying to query for Articles where 2 keywords are matching.
What I tried so far:
This will be Slug = cars OR Slug = BMW
instead of AND.
query GET_CONTENT {
article(
limit: 1
where: {
Keywords:{
Slug: ["cars", "bmw"]
}
}
){
Title
}
}
This will have 0 results. I guess by logic it cannot be the same at the same time, and this one might be a bug I think:
query GET_CONTENT {
article(
limit: 1
where: {
_where: [{
Keywords: {
Slug: "cars"
}
},{
Keywords:{
Slug: "bmw"
}
}]
}
){
Title
}
}