Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Real world use cases of GraphQL API in AEM application

Avatar

Level 8

Hello All,

 

I am new to GraphQL features of AEM. Till now, not used GraphQL API in actual AEM application.

So, could you please pass your real AEM application use cases for usage of GraphQL API feature?

 

Wanted to know about : 1: Business use cases

2: Content Fragment model, CF creation

3: Any Java implementation is required?

4: Run mode specific config changes, Dispatcher setup to allow GraphQL api if any?

 

Much appreciate your effort.

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

@Mahesh_Gunaje Please check the following links for each of your questions

1. Business use case. https://sourcedcode.com/blog/aem/what-are-aem-content-fragments-its-use-cases 

2.Content Fragment model, CF creation. - this is straight forward from Adobe docs, https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/journeys/d...

3.Use AEM Content Services and Proxy API pages (Video #2) when the primary use case is deliver Content Fragments for consumption (Read-only) by a 3rd party channel. The Content Services framework provides more flexibility and options as to what data gets exposed. Developers can also extend the Content Services framework to augment and/or enrich the data.

4. No runmode config needed for this. Regarding graph QL, its well documented here

https://docs.mktossl.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-... 

Also see needed dispatcher changes discussed

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/encoded-graphql-persistent...

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/graphql-endpoint-not-worki...

 

 

 

View solution in original post

5 Replies

Avatar

Correct answer by
Community Advisor

@Mahesh_Gunaje Please check the following links for each of your questions

1. Business use case. https://sourcedcode.com/blog/aem/what-are-aem-content-fragments-its-use-cases 

2.Content Fragment model, CF creation. - this is straight forward from Adobe docs, https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/journeys/d...

3.Use AEM Content Services and Proxy API pages (Video #2) when the primary use case is deliver Content Fragments for consumption (Read-only) by a 3rd party channel. The Content Services framework provides more flexibility and options as to what data gets exposed. Developers can also extend the Content Services framework to augment and/or enrich the data.

4. No runmode config needed for this. Regarding graph QL, its well documented here

https://docs.mktossl.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-... 

Also see needed dispatcher changes discussed

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/encoded-graphql-persistent...

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/graphql-endpoint-not-worki...

 

 

 

Thanks a lot @Saravanan_Dharmaraj   for your effort and details. Much appreciated. I think rather than just reading any new features, need to explore the business use cases. Your details helps me a lot.

Thanks

Avatar

Community Advisor

Hello @Mahesh_Gunaje ,

Some of the real world use cases of GraphQL are but not limited to the following.

 

Imagine a standalone Spring boot application (outside AEM) needs to display content. The content resides in AEM. One could export an AEM page in JSON format via a REST call, however there are many fields in the JSON that the Spring Boot app does not use. Using GraphQL on the other hand does NOT have the extra unwanted data. Just the "exact" fields that the application needs for that request. This makes both the consuming apps and AEM performant.

The reason for this is, GraphQL is a query language and so the external app queries for the information it needs and gets "exactly" that, nothing more nothing less.

 

The queries are cacheable on AEM so that the same query has better response times for repeated requests.

 

Now, imagine an eCommerce app needing information, SAP app system needing content, Salesforce app needing content, or any other similar app that needs content hosted on AEM - GraphQL will be the solution to get up and running in no time.

 

AEM makes Content Fragments available via GraphQL. You could install the WKND project to experiment with CF Models and GraphQL setup: https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-wknd-tutorial-devel...

 

 

With that concept in mind, the following these documents would be a good starting point,

 

  1. https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/g...
  2. https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/g...
  3. https://medium.com/@toimrank/aem-graphql-b06dd1c28cec

 

Hope that helps!

 

thanks,

Preetpal

Avatar

Level 8

Thanks @Preetpal_Bindra  for your effort to write detailed explanation. Yes, you are right. Usually organization will use "x" no of applications and these applications will get(or rely on) a single source of data.