Skip to content

Commit

Permalink
fix monaco-graphql bug with _cacheSchemas() (graphql#2105)
Browse files Browse the repository at this point in the history
Introduced this slight bug with major impact to `monaco-graphql` last night whilst moving things around. Make sure `_cacheSchemas()` is always called on init in the `LanguageService`
  • Loading branch information
acao committed Dec 8, 2021
1 parent 7d634f8 commit f7dc1f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/fuzzy-ants-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'monaco-graphql': patch
---

Fix a bug where `_cacheSchemas()` was not being called by the language service
2 changes: 1 addition & 1 deletion packages/monaco-graphql/src/LanguageService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ export class LanguageService {
this._schemaLoader = defaultSchemaLoader;
if (schemas) {
this._schemas = schemas;
this._cacheSchemas();
}
if (parser) {
this._parser = parser;
this._cacheSchemas();
}

if (parseOptions) {
Expand Down

0 comments on commit f7dc1f1

Please sign in to comment.