datocms / gatsby-source-datocms

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

Incremental build warning: Invalid entity type item_type #121

Closed chrisworman-pela closed 2 years ago

chrisworman-pela commented 3 years ago

I've noticed warning in my Gatsby Cloud build logs stating Invalid entity type item_type. I have incremental builds enabled. Here are the relevant build logs:

12:21:20 PM: success loading DatoCMS schema - 1.856s
12:21:20 PM: success createSchemaCustomization - 2.066s
12:21:20 PM: info Received update event for item_type 266102 from DatoCMS success loading DatoCMS content changes - 0.001s
12:21:20 PM: warning Invalid entity type item_type

This warning appears to be coming from the gatsby-source-datocms plugin. I'm not sure if this is a problem with my web hook configuration or a bug in gatsby-source-datocms. I've setup my Dato CMS web hooks according to instructions provided by @matjack1 (including a custom HTTP body):

Screen Shot 2020-07-30 at 1 41 42 PM

chrisworman-pela commented 3 years ago

In case it helps, here is a screen shot of the logs from the Dato CMS dashboard of an example of an item_type event (this event is not necessarily the one correlated to the build warning in my original issue description ... I'm getting lots of these events as I enable "Publish/Draft" for the models in our Dato CMS repository).

Screen Shot 2020-07-30 at 2 11 57 PM

stefanoverna commented 3 years ago

That's because this plugin does not handle (yet) incremental updates for models: https://github.com/datocms/gatsby-source-datocms/blob/master/src/hooks/sourceNodes/index.js#L160

@ascorbic should we implement this?

sidharthachatterjee commented 3 years ago

@stefanoverna We should be able to pass in incremental updates for events. Let me know if you need any help here!

matjack1 commented 2 years ago

I'm closing this now as it's very old. If someone needs it again, please reopen and we'll start investigating from scratch.