Skip to content
This repository was archived by the owner on Sep 2, 2020. It is now read-only.

Commit 837c860

Browse files
committed
Fix validation
1 parent f1fbf7c commit 837c860

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/interface/src/GraphQLLanguageService.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,14 @@ export class GraphQLLanguageService {
107107
];
108108
}
109109

110-
if (!schemaPath) {
110+
const schema = await this._graphQLCache
111+
.getSchema(
112+
projectConfig.projectName,
113+
queryHasExtensions,
114+
)
115+
.catch(() => null);
116+
117+
if (!schema) {
111118
return [];
112119
}
113120

@@ -138,11 +145,6 @@ export class GraphQLLanguageService {
138145
return [];
139146
}
140147

141-
const schema = await this._graphQLCache.getSchema(
142-
projectConfig.projectName,
143-
queryHasExtensions,
144-
);
145-
146148
// Check if there are custom validation rules to be used
147149
let customRules;
148150
const customRulesModulePath =

0 commit comments

Comments
 (0)