Contentful logo

Contentful Community

Rich text embedded-entry and embedded-asset data is incomplete & inconsistent

I am building a new site with Gatsby and using Contentful for the CMS.

Embedded entries

I have recently started adding embedded entries within some rich text fields, which were working well until today when sometimes the response returned only a small amount of data compared to what it should return.

Like so:

{
  "data": {
    "target": {
      "sys": {
        "id": "nKH0LksSwzlsRkErENR4w",
        "type": "Link",
        "linkType": "Entry",
        "contentful_id": "nKH0LksSwzlsRkErENR4w"
      }
    }
  },
  "content": [],
  "nodeType": "embedded-entry-block"
}

Unfortunately I don’t have a successful response anymore… :disappointed:

Older items with the correct response information were fine until edits were made and republished, then the embedded entry info was broken again.

Embedded assets

The same issues are present with embedded assets.


Can anyone tell me why the responses change? Is this a known issue? Or should I remodel my schema to get around this issue?

By the way, I have tested through the REST API and the response from Contentful directly does not return the expected data.

Hi @zander.martineau

Sadly it’s a known issue`

You would need to clear your cache whenever you add an embedded entry for it to work.

Thanks, I searched the Gatsby issues and didn’t find that issue. Funnily enough, as I mentioned in my post above, I get the same issue even when calling the REST API directly so I deduced that it was not a Gatsby-related issue.

I will try it again and see if clearing the cache produces better results.