We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d989456 commit 7dfaef7Copy full SHA for 7dfaef7
packages/graphql-language-service-interface/src/GraphQLLanguageService.ts
@@ -194,9 +194,11 @@ export class GraphQLLanguageService {
194
195
// Check if there are custom validation rules to be used
196
let customRules: ValidationRule[] | null = null;
197
- const customValidationRules = extensions.customValidationRules;
198
- if (customValidationRules) {
199
- customRules = customValidationRules(this._graphQLConfig);
+ if (
+ extensions?.customValidationRules &&
+ typeof extensions.customValidationRules === 'function'
200
+ ) {
201
+ customRules = extensions.customValidationRules(this._graphQLConfig);
202
203
/* eslint-enable no-implicit-coercion */
204
}
0 commit comments