Expand my Community achievements bar.

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

Can i use GraphQl to retrieve content fragments in AEM page

Avatar

Level 2

I am going through the experience league tutorials on how we can retrieve CF in other application using GraphQl, but there is a scenario where i want to retrieve nested CF's in AEM page so instead of using Content Fragment component can i enable GraphQl endpoint and use that in my AEM page?

4 Replies

Avatar

Community Advisor

hi @coolclassic 

 

Could you  please try exploring option of achieving your option through aem content services :

experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/content-services/overview.html?lang=en

are you planning to use the CF functionality extensively through out site ? I am trying to understand the rationale behind GraphQL.

 

Thanks,

Pallavi Shukla

Avatar

Level 2

Hi Pallavi,

Thank you for your response, we are leveraging GraphQl to consume CF in a React application but there is a need to show the same content with some additional logic within AEM page so instead of using content fragment component i was thinking can i use GraphQl to render CF in AEM? 

 

Avatar

Employee Advisor

Hi @coolclassic ,

 

Please go through this Adobe documentation : https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-ap...

 

It very well explains how graphQL API works with Content Fragment.

Avatar

Level 2

Hi Anish,

I have gone through the documentation, GraphQL API in AEM enables the efficient delivery of Content Fragments to JavaScript clients in headless CMS implementations, my query is instead of any REACT/Angular client can i use these endpoints within Sightly?