eslint-plugin-graphql
eslint-plugin-graphql copied to clipboard
schemaJsonFilepath incompatible with `eslint --cache`
trafficstars
If you use the schemaJsonFilepath option to specify your schema and you use eslint --cache, then changing your schema won't cause files to be re-evaluated.
So for example, you could get an eslint error because you're using a brand new field, use the apollo CLI to update your schema.json, and re-run eslint --cache, but the error will show up again.
This doesn't happen with schemaJson and schemaJsonString, because these embed the schema directly into the config, and a hash of the config is included in .eslintcache.
At the very least, the docs around schemaJsonFilepath could warn about this?