datocms / gatsby-source-datocms

Official GatsbyJS source plugin to pull content from DatoCMS
MIT License
140 stars 51 forks source link

fix(gatsby-source-datocms): pull linked entities on webhook updates #122

Closed pieh closed 4 years ago

pieh commented 4 years ago

This is first attempt at pulling linked entities when Gatsby receive publish webhook.

In case of rich_text (Modular content) fields as well as link(s) we receive just ids of entities to link too, but we don't receive detailed data about those entities so those fields are kept empty. This PR looks to collect linked entity ids and pull them in one go and attach those linked entities with payload.included (entitiesRepo seems to be prepared to handle those additional entities already)

stefanoverna commented 4 years ago

Thanks @pieh, released in 2.4.1!