Hello Team,
We want to use content fragment + graphql feature to expose headless content. We could achieve individual components model and graphql endpoint to specific content fragment via persisted/http post api.
from FE, this could be a problem making a API call for each component from performance point of view. So we want to combine the different content fragment and expose via single api.
Please let us know how we can do this ?
Hero Card -> we have individua endpoint for this component
Teaser -> we have individua endpoint for this component
But we want to expose for page data combined json data of Hero card and teaser in single endpoint.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi,
If you are using the page component that inherits from the core components, you can simply take advantage of the Sling model exporter, which comes out of the box, to export all the data from a page[1]. If this is too much or you need to customize, you can simply extend and use the delegation pattern to simplify or modify the information you need to expose.
[1]. For example: http://localhost:4502/content/wknd/us/en.model.json the "model" selector is reserved to expose ootb the data from a page (if the page component inherits from the core component)
[2]. Delegation pattern: https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models
Hope this helps.
Hi,
If you are using the page component that inherits from the core components, you can simply take advantage of the Sling model exporter, which comes out of the box, to export all the data from a page[1]. If this is too much or you need to customize, you can simply extend and use the delegation pattern to simplify or modify the information you need to expose.
[1]. For example: http://localhost:4502/content/wknd/us/en.model.json the "model" selector is reserved to expose ootb the data from a page (if the page component inherits from the core component)
[2]. Delegation pattern: https://github.com/adobe/aem-core-wcm-components/wiki/Delegation-Pattern-for-Sling-Models
Hope this helps.
@pradeepmoolemane Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
Views
Likes
Replies