Caching issue with getSchema
function
#1232
Labels
kind/enhancement
New feature or request
stage/6-released
The issue has been solved on a released version of the library
Issue workflow progress
Progress of the issue based on the Contributor Workflow
Describe the bug
Hi 👋
I've had some issues with tests using eslint's nodejs API and I realized it is because the parser uses a cached schema. This also seems to be the reason why the eslint service needs to be restarted in IDEs when there is a schema change and some rules, e.g
no-unreachable-types
, don't pick up the change.I appreciate that caching the schema has performance implications, but without being able to reset the cache it can lead to unexpected behavior.
To Reproduce
Steps to reproduce the behavior:
Valid schema:
Invalid schema:
Expected behavior
It should use the new
paserOptions.schema
and therefore return the correct number of errors.Environment:
@graphql-eslint/eslint-plugin
: 3.12.0Resolution
getSchema
function could have one too.While option 1) is quicker to do, option 2) would also make sure that this plugin is working to its fullest in IDEs.
The text was updated successfully, but these errors were encountered: