Hello, I’m a bit confused about OData protocol applied on Squidex schemas.
Basically here, I want to query all the articles that have a specific tag:
{
queryArticleContents(filter: "data/tags/iv/any(d:d/data/label/iv eq 'foo')", orderby: "created desc", skip: 0, top: 10) {
id
"""" ... this is part of my current Article schema """"
data {
tags {
iv {
data {
label {
iv
}
}
}
}
}
}
}
As you can see, by looking the OData docs and various post on StackOverflow, I assumed this condition as good for my case:
data/tags/iv/any(d:d/data/label/iv eq 'foo')
The fact is that the call is returning me this exception - as the title claims:
GraphQL error: Query $filter clause not valid: Any/All may only be used following a collection
Now, because in my schema Tags
is a collection, what’s wrong in that clause? Am I missing something in syntax? For instance, I’ve tried these solutions too without solving this:
data/tags/any(d:d/iv/data/label/iv eq 'foo') <--- Fails
data/tags/any(d:d/data/label/iv eq 'foo') <--- Fails
Thanks in advance for your assistance