Can i use GraphQl to retrieve content fragments in AEM page | Community
Skip to main content
Level 2
March 9, 2022

Can i use GraphQl to retrieve content fragments in AEM page

  • March 9, 2022
  • 2 replies
  • 1110 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

Pallavi_Shukla_
Community Advisor
Community Advisor
March 9, 2022

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

Level 2
March 9, 2022

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? 

 

Anish-Sinha
Adobe Employee
Adobe Employee
March 9, 2022

Hi @coolclassic ,

 

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

 

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

Level 2
March 9, 2022

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?