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

@escape.tech/graphql-armor-max-tokens

Package Overview
Dependencies
Maintainers
4
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@escape.tech/graphql-armor-max-tokens - npm Package Compare versions

Comparing version 2.2.0 to 2.3.0

3

dist/graphql-armor-max-tokens.cjs.dev.js

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

var graphql = require('graphql');
var error = require('graphql/error');
var parser = require('graphql/language/parser');

@@ -68,3 +67,3 @@

if (this._tokenCount > this.config.n) {
const err = error.syntaxError(this._lexer.source, token.start, `Token limit of ${this.config.n} exceeded.`);
const err = new graphql.GraphQLError(`Syntax Error: Token limit of ${this.config.n} exceeded.`);
for (const handler of this.config.onReject) {

@@ -71,0 +70,0 @@ handler(null, err);

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

var graphql = require('graphql');
var error = require('graphql/error');
var parser = require('graphql/language/parser');

@@ -68,3 +67,3 @@

if (this._tokenCount > this.config.n) {
const err = error.syntaxError(this._lexer.source, token.start, `Token limit of ${this.config.n} exceeded.`);
const err = new graphql.GraphQLError(`Syntax Error: Token limit of ${this.config.n} exceeded.`);
for (const handler of this.config.onReject) {

@@ -71,0 +70,0 @@ handler(null, err);

@@ -1,3 +0,2 @@

import { TokenKind } from 'graphql';
import { syntaxError } from 'graphql/error';
import { TokenKind, GraphQLError } from 'graphql';
import { Parser } from 'graphql/language/parser';

@@ -63,3 +62,3 @@

if (this._tokenCount > this.config.n) {
const err = syntaxError(this._lexer.source, token.start, `Token limit of ${this.config.n} exceeded.`);
const err = new GraphQLError(`Syntax Error: Token limit of ${this.config.n} exceeded.`);
for (const handler of this.config.onReject) {

@@ -66,0 +65,0 @@ handler(null, err);

{
"name": "@escape.tech/graphql-armor-max-tokens",
"version": "2.2.0",
"version": "2.3.0",
"description": "Limit the number of tokens allowed in a GraphQL document.",
"packageManager": "yarn@3.6.0",
"packageManager": "yarn@4.0.2",
"main": "dist/graphql-armor-max-tokens.cjs.js",

@@ -33,13 +33,13 @@ "module": "dist/graphql-armor-max-tokens.esm.js",

"optionalDependencies": {
"@envelop/core": "^4.0.0",
"@envelop/core": "^5.0.0",
"@escape.tech/graphql-armor-types": "0.5.0"
},
"devDependencies": {
"@envelop/core": "4.0.0",
"@envelop/testing": "6.0.0",
"@envelop/types": "4.0.0",
"@envelop/core": "5.0.0",
"@envelop/testing": "7.0.0",
"@envelop/types": "5.0.0",
"@escape.tech/graphql-armor-types": "0.5.0",
"graphql": "16.7.1",
"typescript": "5.1.3"
"graphql": "16.8.1",
"typescript": "5.3.3"
}
}
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