AEM 6.5.12 | Persistent query issue with StringFilterExpression parameter
I'm facing an issue with one of the persistent queries which are using the variable of the type StringFilterExpression. Corresponding post query works fine. Wondering if someone faced such an issue before and suggest if we're doing something wrong.
AEM log shows the error message:
Error:
14.02.2023 16:40:50.677 *WARN* [10.124.240.111 [1676392850656] GET /graphql/execute.json/public-aem-common%2FIncentives1%3Bvariables%3D%7B%22incentiveID%22%3A%5B%7B%22value%22%3A%22RI53%22%7D%2C%7B%22value%22%3A%22RI54%22%7D%5D%7D HTTP/1.1] com.adobe.aem.graphql.impl.servlet.PersistedQueryServlet Cannot recognize GraphQL query type: {"errors":[{"message":"Variable 'incentiveID' has coerced Null value for NonNull type '[StringFilterExpression]!'","locations":[{"line":1,"column":24}],"extensions":{"classification":"ValidationError"}}]}
We do see the same error message in Author and Publisher instances. The corresponding post query works fine and returns the result.
We have seen the community question https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/passing-params-to-persisted-query-endpoint-aem-gql/td-p/549140 referring a similar issue but the fix suggested there to pass the parameter after UTF-8 encoding, isn't working for us.
Post query:
query incentiveList($incentiveID:[StringFilterExpression]!,$locale: String){incentiveList(filter:{
incentiveID :{
_logOp: OR
_expressions: $incentiveID
}},
_locale : $locale
)
{items{_path,
incentiveID,
description{html,markdown,plaintext}
}
}}
Graphql Variables:
{"incentiveID": [{"value": "RI53"},{"value":"RI54"}]}