I have a problem with different behavior between local refresh and the refresh on Gatsby Cloud.
Basically handling of the refresh is working normally on the local dev server with the refresh point enabled and cause schema regeneration (modification) on the Gatsby Cloud.
The source plugin itself uses Schema customization API to define the structure of the potential content to prevent the issue when the data is not yet created on the side of CMS, but the developer needs to know what structure could come in the future when the data are filled in Kentico Kontent.
Source plugin is not re-defining the schema - schema is defined only for the initial run, update run does not change the Note types, so I haven't seen a reason to do that for the update. But if this was an issue it would have been broken on local development when hitting the refresh. Are there any differences between local and Gatsby cloud in code execution that could cause schema modification?
Environment (if relevant)
Local environment that works:
System:
OS: Windows 10
CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz
Binaries:
npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.17
Browsers:
Edge: 44.18362.449.0
npmPackages:
gatsby: ^2.18.4 => 2.18.4
Summary
I am writing the first class source plugin for Kentico Kontent and I am facing the issue, but only on Gatsby Cloud.
I have a problem with different behavior between local refresh and the refresh on Gatsby Cloud.
Basically handling of the refresh is working normally on the local dev server with the refresh point enabled and cause schema regeneration (modification) on the Gatsby Cloud.
I have described how to reproduce the problem with the reproduction steps to this branch of the gatsby starter so that you could test this locally.
Relevant information
Gatsby source plugin is in v 4.1.0-beta6 - https://github.com/Kentico/gatsby-source-kontent/tree/preview-functionality
Source plugin is not re-defining the schema - schema is defined only for the initial run, update run does not change the Note types, so I haven't seen a reason to do that for the update. But if this was an issue it would have been broken on local development when hitting the refresh. Are there any differences between local and Gatsby cloud in code execution that could cause schema modification?
Environment (if relevant)
Local environment that works: System: OS: Windows 10 CPU: (8) x64 Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz Binaries: npm: 6.12.0 - C:\Program Files\nodejs\npm.CMD Languages: Python: 2.7.17 Browsers: Edge: 44.18362.449.0 npmPackages: gatsby: ^2.18.4 => 2.18.4