Socket
Socket
Sign inDemoInstall

graphql-js-tree

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphql-js-tree - npm Package Compare versions

Comparing version 0.2.6 to 0.2.7

17

lib/TreeOperations/tree.js

@@ -102,13 +102,2 @@ "use strict";

}
if (node.data.type === Models_1.Instances.Argument) {
const parent = allNodes.find((p) => p.directives.some((a) => a.args.includes(node)));
if (parent) {
const parentDirective = parent.directives.find((d) => d.args.some((a) => a === node));
if (parentDirective) {
const indexInDirective = parentDirective.args.indexOf(node);
deleteFieldFromNode(parentDirective, indexInDirective);
}
}
return;
}
if (node.data.type === Models_1.ValueDefinition.InputValueDefinition) {

@@ -138,2 +127,8 @@ const parent = allNodes.find((parentNode) => parentNode.args.includes(node));

}
if (node.data.type === Models_1.Instances.Directive) {
throw new Error('Directives should be removed on node directly not using this function');
}
if (node.data.type === Models_1.Instances.Argument) {
throw new Error('Directive Arguments should be removed on node directly not using this function');
}
const deletedNode = tree.nodes.findIndex((n) => n === node);

@@ -140,0 +135,0 @@ if (deletedNode === -1)

{
"name": "graphql-js-tree",
"version": "0.2.6",
"version": "0.2.7",
"private": false,

@@ -5,0 +5,0 @@ "license": "MIT",

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