@graphql-tools/stitching-directives 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -7,7 +7,6 @@ const utils_1 = require("@graphql-tools/utils");
|
|
|
7
7
|
const defaultStitchingDirectiveOptions_js_1 = require("./defaultStitchingDirectiveOptions.js");
|
|
8
8
|
const parseMergeArgsExpr_js_1 = require("./parseMergeArgsExpr.js");
|
|
9
9
|
const properties_js_1 = require("./properties.js");
|
|
10
|
-
const stitchingDirectivesValidator_js_1 = require("./stitchingDirectivesValidator.js");
|
|
11
10
|
function stitchingDirectivesTransformer(options = {}) {
|
|
12
11
|
const { keyDirectiveName, computedDirectiveName, mergeDirectiveName, canonicalDirectiveName, pathToDirectivesInExtensions, } = {
|
|
13
12
|
...defaultStitchingDirectiveOptions_js_1.defaultStitchingDirectiveOptions,
|
|
@@ -22,8 +21,6 @@ function stitchingDirectivesTransformer(options = {}) {
|
|
|
22
21
|
const selectionSetsByTypeAndEntryField = Object.create(null);
|
|
23
22
|
const mergedTypesResolversInfoByEntryField = Object.create(null);
|
|
24
23
|
const schema = subschemaConfig.schema;
|
|
25
|
-
// gateway should also run validation
|
|
26
|
-
(0, stitchingDirectivesValidator_js_1.stitchingDirectivesValidator)(options)(schema);
|
|
27
24
|
function setCanonicalDefinition(typeName, fieldName) {
|
|
28
25
|
canonicalTypesInfo[typeName] = canonicalTypesInfo[typeName] || Object.create(null);
|
|
29
26
|
if (fieldName) {
|
|
@@ -4,7 +4,6 @@ import { getDirective, getImplementingTypes, MapperKind, mapSchema, mergeDeep, p
|
|
|
4
4
|
import { defaultStitchingDirectiveOptions } from './defaultStitchingDirectiveOptions.js';
|
|
5
5
|
import { parseMergeArgsExpr } from './parseMergeArgsExpr.js';
|
|
6
6
|
import { addProperty, getProperties, getProperty } from './properties.js';
|
|
7
|
-
import { stitchingDirectivesValidator } from './stitchingDirectivesValidator.js';
|
|
8
7
|
export function stitchingDirectivesTransformer(options = {}) {
|
|
9
8
|
const { keyDirectiveName, computedDirectiveName, mergeDirectiveName, canonicalDirectiveName, pathToDirectivesInExtensions, } = {
|
|
10
9
|
...defaultStitchingDirectiveOptions,
|
|
@@ -19,8 +18,6 @@ export function stitchingDirectivesTransformer(options = {}) {
|
|
|
19
18
|
const selectionSetsByTypeAndEntryField = Object.create(null);
|
|
20
19
|
const mergedTypesResolversInfoByEntryField = Object.create(null);
|
|
21
20
|
const schema = subschemaConfig.schema;
|
|
22
|
-
// gateway should also run validation
|
|
23
|
-
stitchingDirectivesValidator(options)(schema);
|
|
24
21
|
function setCanonicalDefinition(typeName, fieldName) {
|
|
25
22
|
canonicalTypesInfo[typeName] = canonicalTypesInfo[typeName] || Object.create(null);
|
|
26
23
|
if (fieldName) {
|