Hi Team,
Could anyone help me to provide AEM Graphql backend APIs. I'm facing many issues while using the below. And may I know any other graphql APIs to fetch the endpoint data through backend code? Kindly help
import graphql.GraphQL;
import graphql.schema.GraphQLSchema;
Thank you!
Solved! Go to Solution.
Views
Replies
Total Likes
I don't know what you are trying to achieve, but I think you should explore the below alternatives instead of using a GraphQL API:
- GraphQL exposes data as REST API, so technically you could use any REST java framework such as Httpclient, HttpUrlConnection, etc. to call the GraphQL endpoint.
- The GraphQL exposes the data from Content Fragments models (CFM), this same data is accessible if you are working on the AEM backend, you can also consider accessing directly the CFM by their own API instead of adding an extra call to the REST GraphQL API, you could use something like this: https://aemsimplifiedbynikhil.wordpress.com/2020/10/11/content-fragment-as-java-apis/ OR this https://aemdeveloper.wordpress.com/2017/08/22/create-access-the-content-fragment-programmatically/
References:
I don't know what you are trying to achieve, but I think you should explore the below alternatives instead of using a GraphQL API:
- GraphQL exposes data as REST API, so technically you could use any REST java framework such as Httpclient, HttpUrlConnection, etc. to call the GraphQL endpoint.
- The GraphQL exposes the data from Content Fragments models (CFM), this same data is accessible if you are working on the AEM backend, you can also consider accessing directly the CFM by their own API instead of adding an extra call to the REST GraphQL API, you could use something like this: https://aemsimplifiedbynikhil.wordpress.com/2020/10/11/content-fragment-as-java-apis/ OR this https://aemdeveloper.wordpress.com/2017/08/22/create-access-the-content-fragment-programmatically/
References:
Views
Likes
Replies