graphql-language-service-config
Advanced tools
Comparing version 0.0.17 to 0.0.18
@@ -27,2 +27,4 @@ 'use strict'; | ||
var PROJECTS_NAME = 'projects'; | ||
var EXTENSIONS_NAME = 'extensions'; | ||
var CUSTOM_DIRECTIVES_NAME = 'customDirectives'; | ||
var CUSTOM_VALIDATION_RULES_NAME = 'customValidationRules'; | ||
@@ -48,4 +50,2 @@ | ||
// GraphQL language server utilizes an `extensions` config option to customize | ||
// for the situation with many apps with a shared code in one repository. | ||
// This function searches for the additional app configurations and | ||
@@ -111,2 +111,13 @@ // returns the name of the app configuration if found. | ||
GraphQLConfig.prototype.getCustomDirectives = function getCustomDirectives(appName) { | ||
var appConfig = this._getPropertyFromConfig(EXTENSIONS_NAME, appName, null); | ||
if (appConfig && appConfig[CUSTOM_DIRECTIVES_NAME]) { | ||
return appConfig[CUSTOM_DIRECTIVES_NAME] || []; | ||
} | ||
// As a default fallback, search the top level extensions | ||
var fallbackExtension = this._getPropertyFromConfig('extensions', null, null); | ||
return fallbackExtension ? fallbackExtension[CUSTOM_DIRECTIVES_NAME] : []; | ||
}; | ||
GraphQLConfig.prototype.isFileInIncludeDirs = function isFileInIncludeDirs(fileName, appName) { | ||
@@ -113,0 +124,0 @@ if (appName) { |
{ | ||
"name": "graphql-language-service-config", | ||
"repository": "https://github.com/graphql/graphql-language-service", | ||
"version": "0.0.17", | ||
"version": "0.0.18", | ||
"description": "A tool-kit for accessing and using `.graphqlrc` configuration files", | ||
@@ -29,4 +29,4 @@ "contributors": [ | ||
"dependencies": { | ||
"graphql-language-service-types": "0.0.21" | ||
"graphql-language-service-types": "0.0.22" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
21237
274
10
+ Addedgraphql-language-service-types@0.0.22(transitive)
- Removedgraphql-language-service-types@0.0.21(transitive)