Get distinct contentful_ids from gatsby-source-contentful

Not sure if I’m right here, but I think my problem is more a contentful question then a gatsby-source-contentful question. :slightly_smiling_face:

When I query all my content of a content model I get multiple entries for one unique id (contentful_id). It seems like contentful returns all revisions for one id. But I only need the latest.

Is there a way to tell that I only want the latest revision for an id? I could process this within my website, but there should be an easier way.

Hi Christian,

Welcome to the Contentful Community!

Could you show me the GraphQL query you’re using? The IDs are unique and the Content Delivery API (which is used by gatsby-source-contentful) only has access to the most current revision of an entry.