GraphQL Array
In the AEM Sample Queries for filtering tags, the sample CF defines the Categories field as a Tag data type. It uses a filter to find CFs by two tags.
I am trying to emulate this filter on a Tag field. I created a model with a Tag field named tagfield. When I run my query below, I get this error:
...
"message": "Exception while fetching data (/digitalProductList) : Cannot compare single value to an array."
...
"extensions": {
"classification": "DataFetchingException"
}
I checked the docs and tagfield has a "values: [String]" option in the filter.
If I change it to value: "show:comedy", then I get all CFs with that tag. Any ideas why the datatype tag field in my query would be a single string while the example works as a String Array? How can I change my model or query to filter on multiple tags?
| Sample Query | My Query |
| query { cityList(filter: { categories: { _expressions: [ { values: [ "city:beach", "city:na" ] } ] } }) { items { name population country categories } } } | query { } |