Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!

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

Level 7

Hi @niharikamalireddi 

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

Hi @santhosh_kumark ,

 

I didn't find any variable to get by the 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