-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
relint when schema changes #3405
Conversation
🦋 Changeset detectedLatest commit: 7f2493a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3405 +/- ##
==========================================
+ Coverage 55.75% 55.85% +0.10%
==========================================
Files 110 110
Lines 5243 5256 +13
Branches 1426 1432 +6
==========================================
+ Hits 2923 2936 +13
Misses 1897 1897
Partials 423 423
|
The latest changes of this PR are available as canary in npm (based on the declared |
@acao I was trying to get the example package working but I was running into some issues with the duplicate @codemirror/state dependency instances which is why I haven't done that yet. We may have to move the example into the package itself like we did in codemirror-json-schema |
i got around that, in the json schema mode with the same issue. big pr coming there haha |
Oh nice. Can't wait to see what you come up with! |
@imolorhe i was able to make this error go away by moving away from here is a PR! |
Relint when schema changes. Codemirror 6 normally only runs linting whenever the document changes. However this means whenever the GraphQL schema changes, the linting is not run again until the document changes. This can be lead to confusing behaviors.
A new option was added to the linter recently that allows configuring a predicate to determine when the linter will be ran when the state changes. We are leveraging the same here to trigger linting whenever the schema or passed option changes.
Note: linting always runs on document changes irrespective of what we define in this predicate, which is what we want.
Related issue: altair-graphql/altair#2242