Hi ,
Query should be send as below example using Curl command.
Looks like you're trying to pass full query in AEM graphQL URL which is not the viable option
There are three ways to do this in AEM :
- GraphiQL IDE
- cURL (refer below example)
- Other tools (Example : Postman)
$ curl -X PUT \
-H 'authorization: Basic YWRtaW46YWRtaW4=' \
-H "Content-Type: application/json" \
"http://localhost:4502/graphql/persist.json/wknd/plain-article-query-parameters" \
-d \
'query GetAsGraphqlModelTestByPath($apath: String!, $withReference: Boolean = true) {
articleByPath(_path: $apath) {
item {
_path
author
main {
plaintext
}
}
}
}'
Please refer below links :
https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/headless/graphql...
https://kiransg.com/tag/persistance/
Hope this helps !
Thanks