Closed nibtime closed 4 years ago
Hello @nibtime, thank you for reporting this!
Schema registration is currently happening only once the startup. I just couldn't consider the schema change scenario (forgot that the remark source changes it dynamically in runtime :sweat_smile:)
I'll fix it in the right next version! #79
Hey @nibtime, I just fixed this and published v2.2.0
Hope you enjoy :)
@cometkim
wow, that was fast! 😄. Thank you very much!
First of all, thanks for providing this awesome plugin!
Schema and type generation works perfectly and is very fast. The only thing that doesn't seem to work is picking up content model changes (i.e. Markdown). If I add, alter or remove a Markdown frontmatter field while running
gatsby develop
, the change is reflected in the remote schema atlocalhost:8000/___graphql
, but generated schemas bygatsby-plugin-typegen
are not updated, that only happens once when executinggatsby develop
. If I just remove and add known properties from queries or fragments, type generation works instantly as expected.I use the plugin together with the Apollo VS Code extension and consume the remote schema at
localhost:8000/___graphql
instead of the generated schema file inapollo.config.js
to get IntelliSense for content model updates. However, type generation of the plugin fails, because it seems to not know about the schema update:Is it intentional that schema updates only happen at startup (e.g. performance reasons) or is this due to some misconfiguration by me or a bug?