graphql-js-tree
Advanced tools
Comparing version 0.3.7 to 0.3.8
@@ -17,2 +17,3 @@ import { Directive, OperationType, FieldType, Value } from './Spec'; | ||
fromInterface?: string[]; | ||
fromLibrary?: boolean; | ||
value?: { | ||
@@ -19,0 +20,0 @@ type: Value; |
@@ -7,4 +7,5 @@ "use strict"; | ||
const TreeToGraphQL_1 = require("../TreeToGraphQL"); | ||
const addFromLibrary = (n) => (Object.assign(Object.assign({}, n), { fromLibrary: true })); | ||
const mergeNode = (n1, n2) => { | ||
const mergedNode = Object.assign(Object.assign({}, n1), { args: [...n1.args, ...n2.args], directives: [...n1.directives, ...n2.directives], interfaces: [...n1.interfaces, ...n2.interfaces] }); | ||
const mergedNode = Object.assign(Object.assign({}, n1), { args: [...n1.args, ...n2.args.map(addFromLibrary)], directives: [...n1.directives, ...n2.directives.map(addFromLibrary)], interfaces: [...n1.interfaces, ...n2.interfaces] }); | ||
mergedNode.args = mergedNode.args.filter((a, i) => mergedNode.args.findIndex((aa) => aa.name === a.name) === i); | ||
@@ -11,0 +12,0 @@ mergedNode.directives = mergedNode.directives.filter((a, i) => mergedNode.directives.findIndex((aa) => aa.name === a.name) === i); |
{ | ||
"name": "graphql-js-tree", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
119922
2464