Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

Graphql query to get the latest published page

Avatar

Level 1

Hi,

 

My use to get the latest 5 content fragments using the graph ql, I have used the jcr:lastModified in the query but its throwing the error. Pls suggest how to get the latest content fragments as per the published date.

4 Replies

Avatar

Community Advisor

Hi @niharikamalireddi 

Can you share the query you are using to fetch CF based on published date.

Avatar

Community Advisor

Hello @niharikamalireddi 

 

For any date type fields, the format to be followed is

 

calendarMetadata:[CalendarMetadata]!
calendarArrayMetadata:[CalendarArrayMetadata]!

 

Ref: AEM GraphQL API for use with Content Fragments | Adobe Experience Manager

 

Related thread: Solved: GraphQL query list order by latest modified date - Adobe Experience League Community - 45111...


Aanchal Sikka

Avatar

Administrator

@niharikamalireddi  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.



Kautuk Sahni