Contentful logo

Contentful Community

Fetch updatedAt for each entry using Graphql Api

Hi All ,

I have a requirement where I need to get last updated time of each entry in my Graphql query.

Currently I see GraphQl Api only provides publishedAt, firstPublishedAt fields in sys type.

Is there a way to fetch lastUpdatedAt field in my query.

TIA.

Hi @farah_zaidi ,

Update an entry, then you will see it in return for that item.

I guess you might not see it if you have only Saved or Published once.

So even when you do find it, after updating and entry. You will need to check if updatedAt exists, then only get updatedAt, else get firstPublishedAt