Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphql-language-service-interface

Package Overview
Dependencies
Maintainers
4
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-language-service-interface - npm Package Compare versions

Comparing version 0.0.22 to 0.0.23

43

dist/GraphQLLanguageService.js

@@ -39,3 +39,3 @@ 'use strict';

GraphQLLanguageService.prototype.getDiagnostics = function getDiagnostics(query, uri, isRelayCompatMode) {
var source, appName, schema, customRules, fragmentDefinitions, fragmentDependencies, dependenciesSource, customRulesModulePath, rulesPath;
var source, projectConfig, schema, customRules, fragmentDefinitions, fragmentDependencies, dependenciesSource, customRulesModulePath, rulesPath;
return regeneratorRuntime.async(function getDiagnostics$(_context) {

@@ -46,3 +46,3 @@ while (1) {

source = query;
appName = this._graphQLConfig.getAppConfigNameByFilePath(uri);
projectConfig = this._graphQLConfig.getConfigForFile(uri);
// If there's a matching config, proceed to prepare to run validation

@@ -53,3 +53,3 @@

if (!this._graphQLConfig.getSchemaPath(appName)) {
if (!projectConfig.schemaPath) {
_context.next = 18;

@@ -60,3 +60,3 @@ break;

_context.next = 7;
return regeneratorRuntime.awrap(this._graphQLCache.getSchema(this._graphQLConfig.getSchemaPath(appName), appName));
return regeneratorRuntime.awrap(this._graphQLCache.getSchema(projectConfig.projectName));

@@ -66,3 +66,3 @@ case 7:

_context.next = 10;
return regeneratorRuntime.awrap(this._graphQLCache.getFragmentDefinitions(this._graphQLConfig, appName));
return regeneratorRuntime.awrap(this._graphQLCache.getFragmentDefinitions(projectConfig));

@@ -84,3 +84,3 @@ case 10:

// Check if there are custom validation rules to be used
customRulesModulePath = this._graphQLConfig.getCustomValidationRulesModulePath(appName);
customRulesModulePath = projectConfig.extensions.customValidationRules;

@@ -109,3 +109,3 @@ if (customRulesModulePath) {

GraphQLLanguageService.prototype.getAutocompleteSuggestions = function getAutocompleteSuggestions(query, position, filePath) {
var appName, schema;
var projectConfig, schema;
return regeneratorRuntime.async(function getAutocompleteSuggestions$(_context2) {

@@ -115,18 +115,13 @@ while (1) {

case 0:
appName = this._graphQLConfig.getAppConfigNameByFilePath(filePath);
schema = void 0;
projectConfig = this._graphQLConfig.getConfigForFile(filePath);
if (!this._graphQLConfig.getSchemaPath(appName)) {
_context2.next = 8;
if (!projectConfig.schemaPath) {
_context2.next = 5;
break;
}
_context2.next = 5;
return regeneratorRuntime.awrap(this._graphQLCache.getSchema(this._graphQLConfig.getSchemaPath(appName), appName));
schema = projectConfig.getSchema();
case 5:
schema = _context2.sent;
if (!schema) {
_context2.next = 8;
_context2.next = 5;
break;

@@ -137,6 +132,6 @@ }

case 8:
case 5:
return _context2.abrupt('return', []);
case 9:
case 6:
case 'end':

@@ -150,3 +145,3 @@ return _context2.stop();

GraphQLLanguageService.prototype.getDefinition = function getDefinition(query, position, filePath) {
var appName, ast, node;
var projectConfig, ast, node;
return regeneratorRuntime.async(function getDefinition$(_context3) {

@@ -156,3 +151,3 @@ while (1) {

case 0:
appName = this._graphQLConfig.getAppConfigNameByFilePath(filePath);
projectConfig = this._graphQLConfig.getConfigForFile(filePath);
ast = void 0;

@@ -183,3 +178,3 @@ _context3.prev = 2;

case 14:
return _context3.abrupt('return', this._getDefinitionForFragmentSpread(query, ast, node, filePath, this._graphQLConfig, appName));
return _context3.abrupt('return', this._getDefinitionForFragmentSpread(query, ast, node, filePath, projectConfig));

@@ -200,3 +195,3 @@ case 15:

GraphQLLanguageService.prototype._getDefinitionForFragmentSpread = function _getDefinitionForFragmentSpread(query, ast, node, filePath, graphQLConfig, appName) {
GraphQLLanguageService.prototype._getDefinitionForFragmentSpread = function _getDefinitionForFragmentSpread(query, ast, node, filePath, projectConfig) {
var fragmentDefinitions, dependencies, localFragDefinitions, typeCastedDefs, localFragInfos, result;

@@ -208,3 +203,3 @@ return regeneratorRuntime.async(function _getDefinitionForFragmentSpread$(_context4) {

_context4.next = 2;
return regeneratorRuntime.awrap(this._graphQLCache.getFragmentDefinitions(graphQLConfig, appName));
return regeneratorRuntime.awrap(this._graphQLCache.getFragmentDefinitions(projectConfig));

@@ -211,0 +206,0 @@ case 2:

{
"name": "graphql-language-service-interface",
"repository": "https://github.com/graphql/graphql-language-service",
"version": "0.0.22",
"version": "0.0.23",
"description": "Interface to the GraphQL Language Service",

@@ -29,8 +29,8 @@ "contributors": [

"dependencies": {
"graphql": "^0.10.1",
"graphql-language-service-config": "0.0.18",
"graphql-language-service-parser": "0.0.16",
"graphql-language-service-types": "0.0.22",
"graphql-language-service-utils": "0.0.20"
"graphql": "^0.10.5",
"graphql-config": "~1.0.0",
"graphql-language-service-parser": "0.0.17",
"graphql-language-service-types": "0.0.23",
"graphql-language-service-utils": "0.0.21"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc