@graphql-tools/merge
Advanced tools
Comparing version 9.0.3 to 9.0.4-alpha-20240429230249-415b13ddc4823c15d186b09ba9ac7aff3b016303
@@ -5,2 +5,3 @@ "use strict"; | ||
const graphql_1 = require("graphql"); | ||
const ast_js_1 = require("graphql/language/ast.js"); | ||
const utils_1 = require("@graphql-tools/utils"); | ||
@@ -61,2 +62,10 @@ const directives_js_1 = require("./directives.js"); | ||
case graphql_1.Kind.DIRECTIVE_DEFINITION: | ||
if (mergedResultMap[name]) { | ||
const isInheritedFromPrototype = name in {}; // i.e. toString | ||
if (isInheritedFromPrototype) { | ||
if (!(0, ast_js_1.isNode)(mergedResultMap[name])) { | ||
mergedResultMap[name] = undefined; | ||
} | ||
} | ||
} | ||
mergedResultMap[name] = (0, directives_js_1.mergeDirective)(nodeDefinition, mergedResultMap[name]); | ||
@@ -63,0 +72,0 @@ break; |
import { Kind, } from 'graphql'; | ||
import { isNode } from 'graphql/language/ast.js'; | ||
import { collectComment } from '@graphql-tools/utils'; | ||
@@ -56,2 +57,10 @@ import { mergeDirective } from './directives.js'; | ||
case Kind.DIRECTIVE_DEFINITION: | ||
if (mergedResultMap[name]) { | ||
const isInheritedFromPrototype = name in {}; // i.e. toString | ||
if (isInheritedFromPrototype) { | ||
if (!isNode(mergedResultMap[name])) { | ||
mergedResultMap[name] = undefined; | ||
} | ||
} | ||
} | ||
mergedResultMap[name] = mergeDirective(nodeDefinition, mergedResultMap[name]); | ||
@@ -58,0 +67,0 @@ break; |
{ | ||
"name": "@graphql-tools/merge", | ||
"version": "9.0.3", | ||
"version": "9.0.4-alpha-20240429230249-415b13ddc4823c15d186b09ba9ac7aff3b016303", | ||
"description": "A set of utils for faster development of GraphQL tools", | ||
@@ -5,0 +5,0 @@ "sideEffects": false, |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
96501
1927
2