Do not disable inference of node type schemas in your Gatsby plugins  ⛔️ 🧱

It can be tempting to want complete control over the node types created by your plugin. But by adding @dontInfer (or similar), you remove your users' ability to add fields using createNodeField. A common approach to extending the functionality of your plugin.

Explicitly typing out what you expect to be available on your node types is super helpful, but limiting your users like that can be super stressful and hard to debug for them.

  • Is this new? Did custom fields use to show up even with @dontInfer?
  • Am I missing something here that would change my mind?

 
All the best,
Queen Raae

Stuck on a reef in the sharky waters around the Gatsby islands?

Book a 1-on-1 Gatsby Call with Queen Raae. Friendly advice you can put into action immediately, guaranteed!

Serious about Gatsby? Sign up for emails sent every weekday to help you get the most out of Gatsby!