-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debounce schema change events to fix codegen bugs (#3647)
* debounce schema change events to fix codegen bugs on mass file changes, network schema is requesting schema way too frequently because the schema cache is invalidated on every schema file change to address this, we debounce the onSchemaChange event by 400ms also, fix bugs with tests, and schemaCacheTTL setting not being passed to the cache * changeset * fix: docs update * fix: upgrade extension bundlers * Apply formatting suggestions from code review thanks @TallTed! Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
- Loading branch information
Showing
11 changed files
with
582 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
'graphql-language-service-server': patch | ||
'graphql-language-service-cli': patch | ||
'vscode-graphql': patch | ||
--- | ||
|
||
**Bugfixes** | ||
|
||
debounce schema change events to fix codegen bugs to fix #3622 | ||
|
||
on mass file changes, network schema is overfetching because the schema cache is now invalidated on every watched schema file change | ||
|
||
to address this, we debounce the new `onSchemaChange` event by 400ms | ||
|
||
note that `schemaCacheTTL` can only be set in extension settings or graphql config at the top level - it will be ignored if configured per-project in the graphql config | ||
|
||
**Code Improvements** | ||
|
||
- Fixes flaky tests, and `schemaCacheTTL` setting not being passed to the cache | ||
- Adds a test to validate network schema changes are reflected in the cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.