Hello, I am trying to provide a boolean variable value to graphql request, like http://instance?query;default=true
what I am seeing is, it treats the true as a string and not boolean, what can I do so that it is interpreted as a boolean in AEM graphql ? (FYI, i am calling AEM from scala code and the query is formed and called in scala)
Solved! Go to Solution.
Views
Replies
Total Likes
Boolean parameters in Persisted Queries is working correctly in AEM 6.5 and AEM as a Cloud Service up to version 2023.7.0. However, issue started from version 2023.8.0 and persists in the latest release.
You can check Release Notes here in Known issues section [SITES-15622: GraphQL - Issue with persisted queries with number & boolean parameters.] https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/release-notes/maint...
You can check an existing community discussion thread as well
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-do-i-implement-a-persi...
Hi,
GraphQL Query with Boolean Variable:
In your GraphQL query, define the variable with the appropriate type, which in this case is Boolean.
query MyQuery($default: Boolean) {
yes in the persisted query, the variable is defined with the required field type, the issue is when it reads the parameter passed default = true, it interprets as String, the query expects it to be boolean and thus throws exception that there is a type mismatch, Variable 'default' has an invalid value: Expected a Boolean input, but it was a String
So my question is how can I force the interpretation from string to boolean
Boolean parameters in Persisted Queries is working correctly in AEM 6.5 and AEM as a Cloud Service up to version 2023.7.0. However, issue started from version 2023.8.0 and persists in the latest release.
You can check Release Notes here in Known issues section [SITES-15622: GraphQL - Issue with persisted queries with number & boolean parameters.] https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/release-notes/maint...
You can check an existing community discussion thread as well
https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-do-i-implement-a-persi...
@prachimarathe Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes