New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@croquiscom/crary-graphql

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@croquiscom/crary-graphql - npm Package Compare versions

Comparing version 0.9.0 to 0.10.0

27

lib/info/removeArgumentFromInfo.js

@@ -15,14 +15,23 @@ "use strict";

}
if (arg_to_remove.value.kind !== graphql_1.Kind.VARIABLE) {
if (arg_to_remove.value.kind === graphql_1.Kind.VARIABLE) {
const variable_name = arg_to_remove.value.name.value;
const fieldNode = Object.assign(Object.assign({}, info.fieldNodes[0]), { arguments: info.fieldNodes[0].arguments.filter((arg) => arg !== arg_to_remove) });
const variableDefinitions = (info.operation.variableDefinitions || [])
.filter((def) => def.variable.name.value !== variable_name);
return Object.assign(Object.assign({}, info), { fieldNodes: [fieldNode], operation: Object.assign(Object.assign({}, info.operation), { selectionSet: {
kind: graphql_1.Kind.SELECTION_SET,
selections: [fieldNode],
}, variableDefinitions }) });
}
else if ([graphql_1.Kind.INT, graphql_1.Kind.FLOAT, graphql_1.Kind.STRING, graphql_1.Kind.BOOLEAN, graphql_1.Kind.NULL, graphql_1.Kind.ENUM, graphql_1.Kind.LIST, graphql_1.Kind.OBJECT, graphql_1.Kind.OBJECT_FIELD].includes(arg_to_remove.value.kind)) {
const fieldNode = Object.assign(Object.assign({}, info.fieldNodes[0]), { arguments: info.fieldNodes[0].arguments.filter((arg) => arg !== arg_to_remove) });
return Object.assign(Object.assign({}, info), { fieldNodes: [fieldNode], operation: Object.assign(Object.assign({}, info.operation), { selectionSet: {
kind: graphql_1.Kind.SELECTION_SET,
selections: [fieldNode],
} }) });
}
else {
return info;
}
const variable_name = arg_to_remove.value.name.value;
const fieldNode = Object.assign(Object.assign({}, info.fieldNodes[0]), { arguments: info.fieldNodes[0].arguments.filter((arg) => arg !== arg_to_remove) });
const variableDefinitions = (info.operation.variableDefinitions || [])
.filter((def) => def.variable.name.value !== variable_name);
return Object.assign(Object.assign({}, info), { fieldNodes: [fieldNode], operation: Object.assign(Object.assign({}, info.operation), { selectionSet: {
kind: graphql_1.Kind.SELECTION_SET,
selections: [fieldNode],
}, variableDefinitions }) });
}
exports.removeArgumentFromInfo = removeArgumentFromInfo;
{
"name": "@croquiscom/crary-graphql",
"version": "0.9.0",
"version": "0.10.0",
"description": "Croquis's library - graphql extension",

@@ -42,3 +42,3 @@ "main": "./lib",

},
"gitHead": "12415bc17275d25abf1b745d3a32681f42b030c8"
"gitHead": "78b534639d34dd4e3689a82acefb1b270599c851"
}
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