I am trying to implement the Sling Servlet using GraphQl Java where I am referring to the Java-GraphQl documentation to implement it. I was able to print the sample code using the sling servlet mentioned in the below tutorial but wanted to post the query and get the result.
https://www.graphql-java.com/documentation/getting-started
Use Case - I will create a servlet endpoint where hitting with a query will fetch the result from AEM. I know GraphQl content fragments have the same type of use case. but those only fetch the content fragment result. but I was looking at something like below -
Example -
query {
content(path: "/content/test/en") {
pageTitle
resourceType
}
}
Result -
{
"data": {
"content": {
"pageTitle": "English",
"resourceType": "/apps/testproject/components/page"
}
}
}
I am looking to generate the same request-response as above.
Adobe already announced, that they are working on this. But until now, you can only query (read) content fragments. So you have to wait.
This talk contains some outlook for the next features: