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.1.12 to 0.1.13

24

dist/getDiagnostics.js

@@ -8,2 +8,3 @@ 'use strict';

exports.getDiagnostics = getDiagnostics;
exports.validateQuery = validateQuery;
exports.getRange = getRange;

@@ -40,3 +41,3 @@

function getDiagnostics(ast) {
function getDiagnostics(query) {
var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;

@@ -46,2 +47,23 @@ var customRules = arguments[2];

var ast = null;
try {
ast = (0, _graphql.parse)(query);
} catch (error) {
var range = getRange(error.locations[0], query);
return [{
severity: SEVERITY.ERROR,
message: error.message,
source: 'GraphQL: Syntax',
range: range
}];
}
return validateQuery(ast, schema, customRules, isRelayCompatMode);
}
function validateQuery(ast) {
var schema = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
var customRules = arguments[2];
var isRelayCompatMode = arguments[3];
// We cannot validate the query unless a schema is provided.

@@ -48,0 +70,0 @@ if (!schema) {

2

dist/GraphQLLanguageService.js

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

return _context.abrupt('return', (0, _getDiagnostics.getDiagnostics)(validationAst, schema, customRules, isRelayCompatMode));
return _context.abrupt('return', (0, _getDiagnostics.validateQuery)(validationAst, schema, customRules, isRelayCompatMode));

@@ -148,0 +148,0 @@ case 38:

@@ -78,2 +78,8 @@ 'use strict';

});
Object.defineProperty(exports, 'validateQuery', {
enumerable: true,
get: function get() {
return _getDiagnostics.validateQuery;
}
});

@@ -80,0 +86,0 @@ var _getOutline = require('./getOutline');

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

@@ -6,0 +6,0 @@ "contributors": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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