We are using .graphql
files to define a GraphQL schema. Those files are imported in a single index.js
file using this Babel plugin: https://github.com/credcollective/babel-plugin-inline-import
The problem is that changes to the .graphql
files don’t cause a restart, and even worse, when you check out a branch that has changes and start the app, it continues to use some cached files rather than the updated ones.
This results in errors like “___ is defined in resolvers but not in schema”
A meteor reset
fixes it but is overkill. I’m not sure exactly where the cache is to more granularly delete that. It also works to make a non-whitespace change to the index.js
file where the .graphql
files are imported, but that is only a temporary fix. The error comes back if you revert that change.
This general problem is described in the “Caveats” section of the Babel plugin readme here: https://github.com/credcollective/babel-plugin-inline-import#caveats
But while BABEL_DISABLE_CACHE=1
works in a Node app, it doesn’t work in a Meteor app.
Anybody got a solution? Either a way for Meteor Babel to respect BABEL_DISABLE_CACHE=1
or a cleaner way to bust that cache.