@wundergraph/composition 0.58.0 → 0.58.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.
- package/dist/{v1/normalization → directive-definition-data}/directive-definition-data.d.ts +2 -2
- package/dist/{v1/normalization → directive-definition-data}/directive-definition-data.js +308 -280
- package/dist/directive-definition-data/directive-definition-data.js.map +1 -0
- package/dist/directive-definition-data/types/params.d.ts +48 -0
- package/dist/directive-definition-data/types/params.js.map +1 -0
- package/dist/directive-definition-data/types/types.d.ts +39 -0
- package/dist/directive-definition-data/types/types.js.map +1 -0
- package/dist/directive-definition-data/utils.d.ts +5 -0
- package/dist/directive-definition-data/utils.js +75 -0
- package/dist/directive-definition-data/utils.js.map +1 -0
- package/dist/errors/errors.d.ts +35 -9
- package/dist/errors/errors.js +141 -21
- package/dist/errors/errors.js.map +1 -1
- package/dist/errors/{types.d.ts → types/params.d.ts} +34 -6
- package/dist/{federation → errors/types}/params.js.map +1 -1
- package/dist/errors/types/types.d.ts +5 -0
- package/dist/{federation → errors/types}/types.js.map +1 -1
- package/dist/federation/federation.d.ts +2 -2
- package/dist/federation/{params.d.ts → types/params.d.ts} +4 -4
- package/dist/{v1/federation → federation/types}/params.js.map +1 -1
- package/dist/federation/{types.d.ts → types/types.d.ts} +17 -20
- package/dist/{errors → federation/types}/types.js.map +1 -1
- package/dist/index.d.ts +16 -7
- package/dist/index.js +16 -7
- package/dist/index.js.map +1 -1
- package/dist/normalization/normalization.d.ts +2 -3
- package/dist/normalization/normalization.js +0 -8
- package/dist/normalization/normalization.js.map +1 -1
- package/dist/normalization/types.d.ts +21 -18
- package/dist/schema-building/ast.d.ts +2 -10
- package/dist/schema-building/ast.js +35 -32
- package/dist/schema-building/ast.js.map +1 -1
- package/dist/schema-building/types/params.d.ts +54 -0
- package/dist/schema-building/types/params.js.map +1 -0
- package/dist/schema-building/types/results.d.ts +39 -0
- package/dist/schema-building/types/results.js +3 -0
- package/dist/schema-building/types/results.js.map +1 -0
- package/dist/schema-building/{types.d.ts → types/types.d.ts} +21 -41
- package/dist/schema-building/types/types.js.map +1 -0
- package/dist/schema-building/utils.d.ts +21 -13
- package/dist/schema-building/utils.js +257 -82
- package/dist/schema-building/utils.js.map +1 -1
- package/dist/subgraph/types/params.d.ts +6 -0
- package/dist/subgraph/types/params.js +3 -0
- package/dist/{schema-building → subgraph/types}/params.js.map +1 -1
- package/dist/subgraph/types.d.ts +6 -6
- package/dist/subgraph/utils.d.ts +3 -0
- package/dist/subgraph/utils.js +23 -0
- package/dist/subgraph/utils.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/results.d.ts +14 -0
- package/dist/types/results.js +3 -0
- package/dist/types/results.js.map +1 -0
- package/dist/types/types.d.ts +2 -0
- package/dist/utils/composition-version.js +1 -1
- package/dist/utils/params.d.ts +4 -0
- package/dist/utils/string-constants.d.ts +2 -1
- package/dist/utils/string-constants.js +5 -4
- package/dist/utils/string-constants.js.map +1 -1
- package/dist/utils/utils.d.ts +2 -1
- package/dist/utils/utils.js +14 -0
- package/dist/utils/utils.js.map +1 -1
- package/dist/v1/constants/directive-definitions.js +3 -3
- package/dist/v1/constants/directive-definitions.js.map +1 -1
- package/dist/v1/constants/strings.d.ts +3 -1
- package/dist/v1/constants/strings.js +12 -2
- package/dist/v1/constants/strings.js.map +1 -1
- package/dist/v1/federation/federation-factory.d.ts +15 -16
- package/dist/v1/federation/federation-factory.js +344 -213
- package/dist/v1/federation/federation-factory.js.map +1 -1
- package/dist/v1/federation/{params.d.ts → types/params.d.ts} +16 -9
- package/dist/v1/federation/types/params.js +3 -0
- package/dist/v1/federation/types/params.js.map +1 -0
- package/dist/v1/federation/utils.d.ts +2 -2
- package/dist/v1/normalization/batch-normalization/batch-normalizer.d.ts +37 -0
- package/dist/v1/normalization/batch-normalization/batch-normalizer.js +245 -0
- package/dist/v1/normalization/batch-normalization/batch-normalizer.js.map +1 -0
- package/dist/v1/normalization/batch-normalization/types/params.d.ts +6 -0
- package/dist/v1/normalization/batch-normalization/types/params.js +3 -0
- package/dist/v1/normalization/batch-normalization/types/params.js.map +1 -0
- package/dist/v1/normalization/normalization-factory.d.ts +20 -17
- package/dist/v1/normalization/normalization-factory.js +194 -424
- package/dist/v1/normalization/normalization-factory.js.map +1 -1
- package/dist/v1/normalization/{params.d.ts → types/params.d.ts} +6 -12
- package/dist/v1/normalization/types/params.js +3 -0
- package/dist/v1/normalization/types/params.js.map +1 -0
- package/dist/v1/normalization/types/results.d.ts +26 -0
- package/dist/v1/normalization/types/results.js +3 -0
- package/dist/v1/normalization/types/results.js.map +1 -0
- package/dist/v1/normalization/{types.d.ts → types/types.d.ts} +37 -19
- package/dist/v1/normalization/types/types.js +3 -0
- package/dist/v1/normalization/types/types.js.map +1 -0
- package/dist/v1/normalization/utils.d.ts +9 -2
- package/dist/v1/normalization/utils.js +308 -2
- package/dist/v1/normalization/utils.js.map +1 -1
- package/dist/v1/normalization/walkers.js +2 -1
- package/dist/v1/normalization/walkers.js.map +1 -1
- package/dist/v1/schema-building/type-merging.d.ts +1 -1
- package/dist/v1/utils/utils.d.ts +2 -3
- package/dist/v1/utils/utils.js +0 -17
- package/dist/v1/utils/utils.js.map +1 -1
- package/dist/v1/warnings/params.d.ts +6 -1
- package/dist/v1/warnings/warnings.d.ts +4 -1
- package/dist/v1/warnings/warnings.js +23 -0
- package/dist/v1/warnings/warnings.js.map +1 -1
- package/dist/validation/types/params.d.ts +22 -0
- package/dist/validation/types/params.js +3 -0
- package/dist/{v1/normalization → validation/types}/params.js.map +1 -1
- package/dist/validation/validation.d.ts +5 -0
- package/dist/validation/validation.js +213 -0
- package/dist/validation/validation.js.map +1 -0
- package/package.json +4 -3
- package/dist/schema-building/params.d.ts +0 -8
- package/dist/schema-building/types.js.map +0 -1
- package/dist/v1/normalization/directive-definition-data.js.map +0 -1
- package/dist/v1/normalization/types.js.map +0 -1
- /package/dist/{federation → directive-definition-data/types}/params.js +0 -0
- /package/dist/{errors → directive-definition-data/types}/types.js +0 -0
- /package/dist/{schema-building → errors/types}/params.js +0 -0
- /package/dist/{federation → errors/types}/types.js +0 -0
- /package/dist/{v1/federation → federation/types}/params.js +0 -0
- /package/dist/{v1/normalization → federation/types}/types.js +0 -0
- /package/dist/{v1/normalization → schema-building/types}/params.js +0 -0
- /package/dist/schema-building/{types.js → types/types.js} +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ConstDirectiveNode, type ConstValueNode, type DirectiveDefinitionNode, type EnumValueDefinitionNode, type FieldDefinitionNode, type InputValueDefinitionNode, type InterfaceTypeDefinitionNode, type InterfaceTypeExtensionNode, Kind, type NamedTypeNode, type NameNode, type ObjectTypeDefinitionNode, type ObjectTypeExtensionNode, type StringValueNode, type TypeNode } from 'graphql';
|
|
2
|
+
import { type ExtractDirectiveLocationsResult } from './types/results';
|
|
2
3
|
export type MutableDirectiveDefinitionNode = {
|
|
3
4
|
arguments: MutableInputValueNode[];
|
|
4
5
|
kind: Kind.DIRECTIVE_DEFINITION;
|
|
@@ -7,7 +8,6 @@ export type MutableDirectiveDefinitionNode = {
|
|
|
7
8
|
repeatable: boolean;
|
|
8
9
|
description?: StringValueNode;
|
|
9
10
|
};
|
|
10
|
-
export declare function getMutableDirectiveDefinitionNode(node: DirectiveDefinitionNode): MutableDirectiveDefinitionNode;
|
|
11
11
|
export type MutableEnumNode = {
|
|
12
12
|
kind: Kind.ENUM_TYPE_DEFINITION;
|
|
13
13
|
name: NameNode;
|
|
@@ -67,15 +67,6 @@ export type MutableObjectNode = {
|
|
|
67
67
|
interfaces?: NamedTypeNode[];
|
|
68
68
|
};
|
|
69
69
|
export declare function getMutableObjectNode(nameNode: NameNode): MutableObjectNode;
|
|
70
|
-
export type MutableObjectExtensionNode = {
|
|
71
|
-
kind: Kind.OBJECT_TYPE_EXTENSION;
|
|
72
|
-
name: NameNode;
|
|
73
|
-
description?: StringValueNode;
|
|
74
|
-
directives?: ConstDirectiveNode[];
|
|
75
|
-
fields?: FieldDefinitionNode[];
|
|
76
|
-
interfaces?: NamedTypeNode[];
|
|
77
|
-
};
|
|
78
|
-
export declare function getMutableObjectExtensionNode(node: ObjectTypeDefinitionNode | ObjectTypeExtensionNode): MutableObjectExtensionNode;
|
|
79
70
|
export type MutableScalarNode = {
|
|
80
71
|
kind: Kind.SCALAR_TYPE_DEFINITION;
|
|
81
72
|
name: NameNode;
|
|
@@ -114,3 +105,4 @@ export type MutableDefinitionNode = MutableDirectiveDefinitionNode | MutableEnum
|
|
|
114
105
|
export type CompositeOutputNode = InterfaceTypeDefinitionNode | InterfaceTypeExtensionNode | ObjectTypeDefinitionNode | ObjectTypeExtensionNode;
|
|
115
106
|
export declare function getTypeNodeNamedTypeName(typeNode: TypeNode): string;
|
|
116
107
|
export declare function getNamedTypeNode(typeNode: TypeNode): TypeNode;
|
|
108
|
+
export declare function extractDirectiveLocations(node: DirectiveDefinitionNode): ExtractDirectiveLocationsResult;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getMutableDirectiveDefinitionNode = getMutableDirectiveDefinitionNode;
|
|
4
3
|
exports.getMutableEnumNode = getMutableEnumNode;
|
|
5
4
|
exports.getMutableEnumValueNode = getMutableEnumValueNode;
|
|
6
5
|
exports.getMutableFieldNode = getMutableFieldNode;
|
|
@@ -8,26 +7,18 @@ exports.getMutableInputObjectNode = getMutableInputObjectNode;
|
|
|
8
7
|
exports.getMutableInputValueNode = getMutableInputValueNode;
|
|
9
8
|
exports.getMutableInterfaceNode = getMutableInterfaceNode;
|
|
10
9
|
exports.getMutableObjectNode = getMutableObjectNode;
|
|
11
|
-
exports.getMutableObjectExtensionNode = getMutableObjectExtensionNode;
|
|
12
10
|
exports.getMutableScalarNode = getMutableScalarNode;
|
|
13
11
|
exports.getMutableTypeNode = getMutableTypeNode;
|
|
14
12
|
exports.getMutableUnionNode = getMutableUnionNode;
|
|
15
13
|
exports.getTypeNodeNamedTypeName = getTypeNodeNamedTypeName;
|
|
16
14
|
exports.getNamedTypeNode = getNamedTypeNode;
|
|
15
|
+
exports.extractDirectiveLocations = extractDirectiveLocations;
|
|
17
16
|
const graphql_1 = require("graphql");
|
|
18
17
|
const utils_1 = require("../ast/utils");
|
|
19
18
|
const errors_1 = require("../errors/errors");
|
|
20
19
|
const integer_constants_1 = require("../utils/integer-constants");
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
arguments: [],
|
|
24
|
-
kind: node.kind,
|
|
25
|
-
locations: [],
|
|
26
|
-
name: { ...node.name },
|
|
27
|
-
repeatable: node.repeatable,
|
|
28
|
-
description: (0, utils_1.formatDescription)(node.description),
|
|
29
|
-
};
|
|
30
|
-
}
|
|
20
|
+
const string_constants_1 = require("../utils/string-constants");
|
|
21
|
+
const strings_1 = require("../v1/constants/strings");
|
|
31
22
|
function getMutableEnumNode(nameNode) {
|
|
32
23
|
return {
|
|
33
24
|
kind: graphql_1.Kind.ENUM_TYPE_DEFINITION,
|
|
@@ -80,14 +71,6 @@ function getMutableObjectNode(nameNode) {
|
|
|
80
71
|
name: { ...nameNode },
|
|
81
72
|
};
|
|
82
73
|
}
|
|
83
|
-
function getMutableObjectExtensionNode(node) {
|
|
84
|
-
const description = node.kind === graphql_1.Kind.OBJECT_TYPE_DEFINITION ? node.description : undefined;
|
|
85
|
-
return {
|
|
86
|
-
kind: graphql_1.Kind.OBJECT_TYPE_EXTENSION,
|
|
87
|
-
name: { ...node.name },
|
|
88
|
-
description: (0, utils_1.formatDescription)(description),
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
74
|
function getMutableScalarNode(nameNode) {
|
|
92
75
|
return {
|
|
93
76
|
kind: graphql_1.Kind.SCALAR_TYPE_DEFINITION,
|
|
@@ -129,21 +112,41 @@ function getMutableUnionNode(nameNode) {
|
|
|
129
112
|
};
|
|
130
113
|
}
|
|
131
114
|
function getTypeNodeNamedTypeName(typeNode) {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
return typeNode.name.value;
|
|
135
|
-
case graphql_1.Kind.LIST_TYPE:
|
|
136
|
-
// intentional fallthrough
|
|
137
|
-
case graphql_1.Kind.NON_NULL_TYPE:
|
|
138
|
-
return getTypeNodeNamedTypeName(typeNode.type);
|
|
115
|
+
if (typeNode.kind === graphql_1.Kind.NAMED_TYPE) {
|
|
116
|
+
return typeNode.name.value;
|
|
139
117
|
}
|
|
118
|
+
return getTypeNodeNamedTypeName(typeNode.type);
|
|
140
119
|
}
|
|
141
120
|
function getNamedTypeNode(typeNode) {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
return typeNode;
|
|
145
|
-
default:
|
|
146
|
-
return getNamedTypeNode(typeNode.type);
|
|
121
|
+
if (typeNode.kind === graphql_1.Kind.NAMED_TYPE) {
|
|
122
|
+
return typeNode;
|
|
147
123
|
}
|
|
124
|
+
return getNamedTypeNode(typeNode.type);
|
|
125
|
+
}
|
|
126
|
+
function extractDirectiveLocations(node) {
|
|
127
|
+
const errors = [];
|
|
128
|
+
const locations = new Set();
|
|
129
|
+
const handledLocations = new Set();
|
|
130
|
+
for (const locationNode of node.locations) {
|
|
131
|
+
const locationName = locationNode.value;
|
|
132
|
+
if (handledLocations.has(locationName)) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
if (!string_constants_1.EXECUTABLE_DIRECTIVE_LOCATIONS.has(locationName) && !strings_1.TYPE_SYSTEM_DIRECTIVE_LOCATIONS.has(locationName)) {
|
|
136
|
+
errors.push((0, errors_1.invalidDirectiveDefinitionLocationError)(locationName));
|
|
137
|
+
handledLocations.add(locationName);
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
if (locations.has(locationName)) {
|
|
141
|
+
errors.push((0, errors_1.duplicateDirectiveDefinitionLocationError)(locationName));
|
|
142
|
+
handledLocations.add(locationName);
|
|
143
|
+
continue;
|
|
144
|
+
}
|
|
145
|
+
locations.add(locationName);
|
|
146
|
+
}
|
|
147
|
+
return {
|
|
148
|
+
errors,
|
|
149
|
+
locations,
|
|
150
|
+
};
|
|
148
151
|
}
|
|
149
152
|
//# sourceMappingURL=ast.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/schema-building/ast.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ast.js","sourceRoot":"","sources":["../../src/schema-building/ast.ts"],"names":[],"mappings":";;AAiDA,gDAKC;AASD,0DAOC;AAWD,kDASC;AAUD,8DAKC;AAWD,4DAaC;AAWD,0DAKC;AAWD,oDAKC;AASD,oDAKC;AA0BD,gDA2BC;AAUD,kDAKC;AAiBD,4DAKC;AAED,4CAKC;AAED,8DAyBC;AA3SD,qCAgBiB;AACjB,wCAAwG;AACxG,6CAO0B;AAC1B,kEAAkE;AAClE,gEAA2E;AAC3E,qDAA0E;AAqB1E,SAAgB,kBAAkB,CAAC,QAAkB;IACnD,OAAO;QACL,IAAI,EAAE,cAAI,CAAC,oBAAoB;QAC/B,IAAI,EAAE,EAAE,GAAG,QAAQ,EAAE;KACtB,CAAC;AACJ,CAAC;AASD,SAAgB,uBAAuB,CAAC,IAA6B;IACnE,OAAO;QACL,UAAU,EAAE,EAAE;QACd,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE;QACtB,WAAW,EAAE,IAAA,yBAAiB,EAAC,IAAI,CAAC,WAAW,CAAC;KACjD,CAAC;AACJ,CAAC;AAWD,SAAgB,mBAAmB,CAAC,IAAyB,EAAE,QAAgB,EAAE,MAAe;IAC9F,OAAO;QACL,SAAS,EAAE,EAAE;QACb,UAAU,EAAE,EAAE;QACd,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,EAAE,EAAE,GAAG,IAAI,CAAC,IAAI,EAAE;QACtB,IAAI,EAAE,kBAAkB,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,MAAM,CA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CAAC,IAAI,CAAC,IAAA,kDAAyC,EAAC,YAAY,CAAC,CAAC,CAAC;YACrE,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACnC,SAAS;QACX,CAAC;QACD,SAAS,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC9B,CAAC;IACD,OAAO;QACL,MAAM;QACN,SAAS;KACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type StringValueNode, type TypeNode } from 'graphql';
|
|
2
|
+
import { type DirectiveName, type InterfaceTypeName, type TypeName } from '../../types/types';
|
|
3
|
+
import { type EnumValueData, type FieldData, type InputValueData, type NodeData, type ParentDefinitionData } from './types';
|
|
4
|
+
import type { MutableInputValueNode } from '../ast';
|
|
5
|
+
import { type DirectiveArgumentData, type DirectiveDefinitionData } from '../../directive-definition-data/types/types';
|
|
6
|
+
export type IsTypeValidImplementationParams = {
|
|
7
|
+
concreteTypeNamesByAbstractTypeName: Map<TypeName, Set<TypeName>>;
|
|
8
|
+
implementationType: TypeNode;
|
|
9
|
+
interfaceImplementationTypeNamesByInterfaceTypeName: Map<InterfaceTypeName, Set<InterfaceTypeName>>;
|
|
10
|
+
originalType: TypeNode;
|
|
11
|
+
};
|
|
12
|
+
export type GetRouterFederatedDirectiveNodesParams = {
|
|
13
|
+
data: NodeData;
|
|
14
|
+
federatedDirectiveDataByName: Map<DirectiveName, DirectiveDefinitionData>;
|
|
15
|
+
parentDefinitionDataByTypeName: Map<TypeName, ParentDefinitionData>;
|
|
16
|
+
};
|
|
17
|
+
export type GetValidArgumentNodesParams = {
|
|
18
|
+
data: DirectiveDefinitionData;
|
|
19
|
+
federatedDirectiveDataByName: Map<DirectiveName, DirectiveDefinitionData>;
|
|
20
|
+
parentDefinitionDataByTypeName: Map<TypeName, ParentDefinitionData>;
|
|
21
|
+
};
|
|
22
|
+
export type DirectiveDefinitionNodeFromDataParams = {
|
|
23
|
+
data: DirectiveDefinitionData;
|
|
24
|
+
federatedDirectiveDataByName: Map<DirectiveName, DirectiveDefinitionData>;
|
|
25
|
+
parentDefinitionDataByTypeName: Map<TypeName, ParentDefinitionData>;
|
|
26
|
+
};
|
|
27
|
+
export type SanitizeDefaultValueParams = {
|
|
28
|
+
data: DirectiveArgumentData | InputValueData;
|
|
29
|
+
namedTypeData: ParentDefinitionData;
|
|
30
|
+
node?: MutableInputValueNode;
|
|
31
|
+
};
|
|
32
|
+
export type RouterSchemaFieldNodeFromDataParams = {
|
|
33
|
+
argumentNodes: Array<MutableInputValueNode>;
|
|
34
|
+
data: FieldData;
|
|
35
|
+
federatedDirectiveDataByName: Map<DirectiveName, DirectiveDefinitionData>;
|
|
36
|
+
parentDefinitionDataByTypeName: Map<TypeName, ParentDefinitionData>;
|
|
37
|
+
description?: StringValueNode;
|
|
38
|
+
};
|
|
39
|
+
export type RouterSchemaInputValueNodeFromDataParams = {
|
|
40
|
+
data: DirectiveArgumentData | InputValueData;
|
|
41
|
+
federatedDirectiveDataByName: Map<DirectiveName, DirectiveDefinitionData>;
|
|
42
|
+
parentDefinitionDataByTypeName: Map<TypeName, ParentDefinitionData>;
|
|
43
|
+
description?: StringValueNode;
|
|
44
|
+
};
|
|
45
|
+
export type RouterSchemaNodeFromDataParams = {
|
|
46
|
+
data: EnumValueData | ParentDefinitionData;
|
|
47
|
+
federatedDirectiveDataByName: Map<DirectiveName, DirectiveDefinitionData>;
|
|
48
|
+
parentDefinitionDataByTypeName: Map<TypeName, ParentDefinitionData>;
|
|
49
|
+
description?: StringValueNode;
|
|
50
|
+
};
|
|
51
|
+
export type CompareAndValidateInputDefaultValuesParams = {
|
|
52
|
+
existingData: DirectiveArgumentData | InputValueData;
|
|
53
|
+
incomingData: DirectiveArgumentData | InputValueData;
|
|
54
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.js","sourceRoot":"","sources":["../../../src/schema-building/types/params.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { type ConstDirectiveNode, type DirectiveDefinitionNode } from 'graphql';
|
|
2
|
+
import { type MutableEnumValueNode, type MutableFieldNode, type MutableInputValueNode } from '../ast';
|
|
3
|
+
import { type ExecutionMultiFailure, type ExecutionSuccess } from '../../types/results';
|
|
4
|
+
import { type MutableParentDefinitionNode } from './types';
|
|
5
|
+
import { type DirectiveLocation } from '../../types/types';
|
|
6
|
+
import { type Warning } from '../../warnings/types';
|
|
7
|
+
export interface GetFederatedDirectiveNodesSuccess extends ExecutionSuccess {
|
|
8
|
+
nodes: Array<ConstDirectiveNode>;
|
|
9
|
+
warnings: Array<Warning>;
|
|
10
|
+
}
|
|
11
|
+
export type GetFederatedDirectiveNodesResult = ExecutionMultiFailure | GetFederatedDirectiveNodesSuccess;
|
|
12
|
+
export interface InputValueNodesSuccess extends ExecutionSuccess {
|
|
13
|
+
nodes: Array<MutableInputValueNode>;
|
|
14
|
+
warnings: Array<Warning>;
|
|
15
|
+
}
|
|
16
|
+
export type InputValueNodesResult = ExecutionMultiFailure | InputValueNodesSuccess;
|
|
17
|
+
export interface DirectiveDefinitionNodeSuccess extends ExecutionSuccess {
|
|
18
|
+
node: DirectiveDefinitionNode;
|
|
19
|
+
}
|
|
20
|
+
export type DirectiveDefinitionNodeResult = ExecutionMultiFailure | DirectiveDefinitionNodeSuccess;
|
|
21
|
+
export interface RouterSchemaFieldNodeFromDataSuccess extends ExecutionSuccess {
|
|
22
|
+
node: MutableFieldNode;
|
|
23
|
+
warnings: Array<Warning>;
|
|
24
|
+
}
|
|
25
|
+
export type RouterSchemaFieldNodeFromDataResult = ExecutionMultiFailure | RouterSchemaFieldNodeFromDataSuccess;
|
|
26
|
+
export interface RouterSchemaInputValueNodeFromDataSuccess extends ExecutionSuccess {
|
|
27
|
+
node: MutableInputValueNode;
|
|
28
|
+
warnings: Array<Warning>;
|
|
29
|
+
}
|
|
30
|
+
export type RouterSchemaInputValueNodeFromDataResult = ExecutionMultiFailure | RouterSchemaInputValueNodeFromDataSuccess;
|
|
31
|
+
export interface RouterSchemaNodeFromDataSuccess<T extends MutableParentDefinitionNode | MutableEnumValueNode> extends ExecutionSuccess {
|
|
32
|
+
node: T;
|
|
33
|
+
warnings: Array<Warning>;
|
|
34
|
+
}
|
|
35
|
+
export type RouterSchemaNodeFromDataResult<T extends MutableParentDefinitionNode | MutableEnumValueNode> = ExecutionMultiFailure | RouterSchemaNodeFromDataSuccess<T>;
|
|
36
|
+
export type ExtractDirectiveLocationsResult = {
|
|
37
|
+
errors: Array<Error>;
|
|
38
|
+
locations: Set<DirectiveLocation>;
|
|
39
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"results.js","sourceRoot":"","sources":["../../../src/schema-building/types/results.ts"],"names":[],"mappings":""}
|
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
import { type ConstDirectiveNode, type ConstValueNode, type
|
|
2
|
-
import { type MutableEnumNode, type MutableEnumValueNode, type MutableFieldNode, type MutableInputObjectNode, type MutableInputValueNode, type MutableInterfaceNode, type MutableObjectNode, type MutableScalarNode, type MutableTypeNode, type MutableUnionNode } from '
|
|
3
|
-
import { type FieldSetConditionData } from '
|
|
4
|
-
import { type KeyFieldSetData } from '
|
|
5
|
-
import { type InputNodeKind, type OutputNodeKind } from '
|
|
6
|
-
import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '
|
|
7
|
-
|
|
8
|
-
name: string;
|
|
9
|
-
typeNode: TypeNode;
|
|
10
|
-
defaultValue?: ConstValueNode;
|
|
11
|
-
};
|
|
1
|
+
import { type ConstDirectiveNode, type ConstValueNode, type DocumentNode, type Kind, type NamedTypeNode, type OperationTypeDefinitionNode, type OperationTypeNode, type StringValueNode } from 'graphql';
|
|
2
|
+
import { type MutableEnumNode, type MutableEnumValueNode, type MutableFieldNode, type MutableInputObjectNode, type MutableInputValueNode, type MutableInterfaceNode, type MutableObjectNode, type MutableScalarNode, type MutableTypeNode, type MutableUnionNode } from '../ast';
|
|
3
|
+
import { type FieldSetConditionData } from '../../router-configuration/types';
|
|
4
|
+
import { type KeyFieldSetData } from '../../v1/normalization/types/types';
|
|
5
|
+
import { type InputNodeKind, type OutputNodeKind } from '../../utils/types';
|
|
6
|
+
import { type ArgumentName, type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../../types/types';
|
|
7
|
+
import { type DirectiveArgumentData, type DirectiveDefinitionData } from '../../directive-definition-data/types/types';
|
|
12
8
|
export type ConfigureDescriptionData = {
|
|
13
9
|
propagate: boolean;
|
|
14
10
|
description: string;
|
|
15
11
|
};
|
|
16
|
-
export type DirectiveDefinitionData = {
|
|
17
|
-
argumentTypeNodeByName: Map<string, ArgumentData>;
|
|
18
|
-
isRepeatable: boolean;
|
|
19
|
-
locations: Set<string>;
|
|
20
|
-
name: string;
|
|
21
|
-
node: DirectiveDefinitionNode;
|
|
22
|
-
optionalArgumentNames: Set<string>;
|
|
23
|
-
requiredArgumentNames: Set<string>;
|
|
24
|
-
};
|
|
25
12
|
export declare enum ExtensionType {
|
|
26
13
|
EXTENDS = 0,
|
|
27
14
|
NONE = 1,
|
|
@@ -37,7 +24,7 @@ export type EnumDefinitionData = {
|
|
|
37
24
|
kind: Kind.ENUM_TYPE_DEFINITION;
|
|
38
25
|
name: string;
|
|
39
26
|
node: MutableEnumNode;
|
|
40
|
-
|
|
27
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
41
28
|
subgraphNames: Set<SubgraphName>;
|
|
42
29
|
description?: StringValueNode;
|
|
43
30
|
};
|
|
@@ -50,7 +37,7 @@ export type EnumValueData = {
|
|
|
50
37
|
name: string;
|
|
51
38
|
node: MutableEnumValueNode;
|
|
52
39
|
parentTypeName: TypeName;
|
|
53
|
-
|
|
40
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
54
41
|
subgraphNames: Set<SubgraphName>;
|
|
55
42
|
description?: StringValueNode;
|
|
56
43
|
};
|
|
@@ -59,7 +46,7 @@ export type ExternalFieldData = {
|
|
|
59
46
|
isUnconditionallyProvided: boolean;
|
|
60
47
|
};
|
|
61
48
|
export type FieldData = {
|
|
62
|
-
argumentDataByName: Map<
|
|
49
|
+
argumentDataByName: Map<ArgumentName, InputValueData>;
|
|
63
50
|
configureDescriptionDataBySubgraphName: Map<SubgraphName, ConfigureDescriptionData>;
|
|
64
51
|
directivesByName: Map<DirectiveName, Array<ConstDirectiveNode>>;
|
|
65
52
|
externalFieldDataBySubgraphName: Map<SubgraphName, ExternalFieldData>;
|
|
@@ -74,7 +61,7 @@ export type FieldData = {
|
|
|
74
61
|
node: MutableFieldNode;
|
|
75
62
|
nullLevelsBySubgraphName: Map<SubgraphName, Set<number>>;
|
|
76
63
|
originalParentTypeName: TypeName;
|
|
77
|
-
|
|
64
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
78
65
|
renamedParentTypeName: TypeName;
|
|
79
66
|
subgraphNames: Set<SubgraphName>;
|
|
80
67
|
type: MutableTypeNode;
|
|
@@ -89,7 +76,7 @@ export type InputObjectDefinitionData = {
|
|
|
89
76
|
kind: Kind.INPUT_OBJECT_TYPE_DEFINITION;
|
|
90
77
|
name: TypeName;
|
|
91
78
|
node: MutableInputObjectNode;
|
|
92
|
-
|
|
79
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
93
80
|
subgraphNames: Set<SubgraphName>;
|
|
94
81
|
description?: StringValueNode;
|
|
95
82
|
};
|
|
@@ -106,7 +93,7 @@ export type InputValueData = {
|
|
|
106
93
|
node: MutableInputValueNode;
|
|
107
94
|
originalCoords: string;
|
|
108
95
|
originalParentTypeName: TypeName;
|
|
109
|
-
|
|
96
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
110
97
|
renamedParentTypeName: TypeName;
|
|
111
98
|
requiredSubgraphNames: Set<SubgraphName>;
|
|
112
99
|
subgraphNames: Set<SubgraphName>;
|
|
@@ -126,7 +113,7 @@ export type InterfaceDefinitionData = {
|
|
|
126
113
|
kind: Kind.INTERFACE_TYPE_DEFINITION;
|
|
127
114
|
name: TypeName;
|
|
128
115
|
node: MutableInterfaceNode;
|
|
129
|
-
|
|
116
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
130
117
|
requireFetchReasonsFieldNames: Set<FieldName>;
|
|
131
118
|
subgraphNames: Set<SubgraphName>;
|
|
132
119
|
description?: StringValueNode;
|
|
@@ -143,21 +130,13 @@ export type ObjectDefinitionData = {
|
|
|
143
130
|
kind: Kind.OBJECT_TYPE_DEFINITION;
|
|
144
131
|
name: TypeName;
|
|
145
132
|
node: MutableObjectNode;
|
|
146
|
-
|
|
133
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
147
134
|
renamedTypeName: TypeName;
|
|
148
135
|
requireFetchReasonsFieldNames: Set<FieldName>;
|
|
149
136
|
subgraphNames: Set<SubgraphName>;
|
|
150
137
|
description?: StringValueNode;
|
|
151
138
|
};
|
|
152
|
-
export type
|
|
153
|
-
argumentDataByName: Map<string, InputValueData>;
|
|
154
|
-
executableLocations: Set<string>;
|
|
155
|
-
name: DirectiveName;
|
|
156
|
-
repeatable: boolean;
|
|
157
|
-
subgraphNames: Set<SubgraphName>;
|
|
158
|
-
description?: StringValueNode;
|
|
159
|
-
};
|
|
160
|
-
export type PersistedDirectivesData = {
|
|
139
|
+
export type FederatedDirectivesData = {
|
|
161
140
|
deprecatedReason: string;
|
|
162
141
|
directivesByName: Map<DirectiveName, Array<ConstDirectiveNode>>;
|
|
163
142
|
isDeprecated: boolean;
|
|
@@ -170,7 +149,7 @@ export type ScalarDefinitionData = {
|
|
|
170
149
|
kind: Kind.SCALAR_TYPE_DEFINITION;
|
|
171
150
|
name: TypeName;
|
|
172
151
|
node: MutableScalarNode;
|
|
173
|
-
|
|
152
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
174
153
|
subgraphNames: Set<SubgraphName>;
|
|
175
154
|
description?: StringValueNode;
|
|
176
155
|
};
|
|
@@ -189,15 +168,15 @@ export type UnionDefinitionData = {
|
|
|
189
168
|
name: TypeName;
|
|
190
169
|
memberByMemberTypeName: Map<TypeName, NamedTypeNode>;
|
|
191
170
|
node: MutableUnionNode;
|
|
192
|
-
|
|
171
|
+
federatedDirectivesData: FederatedDirectivesData;
|
|
193
172
|
subgraphNames: Set<SubgraphName>;
|
|
194
173
|
description?: StringValueNode;
|
|
195
174
|
};
|
|
196
175
|
export type ParentDefinitionData = EnumDefinitionData | InputObjectDefinitionData | InterfaceDefinitionData | ObjectDefinitionData | ScalarDefinitionData | UnionDefinitionData;
|
|
197
176
|
export type ChildData = EnumValueData | FieldData | InputValueData;
|
|
198
177
|
export type CompositeOutputData = InterfaceDefinitionData | ObjectDefinitionData;
|
|
199
|
-
export type DefinitionData = EnumDefinitionData | EnumValueData | FieldData | InputObjectDefinitionData | InputValueData | InterfaceDefinitionData | ObjectDefinitionData |
|
|
200
|
-
export type NodeData = ParentDefinitionData |
|
|
178
|
+
export type DefinitionData = DirectiveArgumentData | DirectiveDefinitionData | EnumDefinitionData | EnumValueData | FieldData | InputObjectDefinitionData | InputValueData | InterfaceDefinitionData | ObjectDefinitionData | ScalarDefinitionData | UnionDefinitionData;
|
|
179
|
+
export type NodeData = ChildData | ParentDefinitionData | DirectiveArgumentData;
|
|
201
180
|
export type EntityData = {
|
|
202
181
|
documentNodeByKeyFieldSet: Map<string, DocumentNode>;
|
|
203
182
|
keyFieldSets: Set<string>;
|
|
@@ -252,3 +231,4 @@ export type EntityInterfaceFederationData = {
|
|
|
252
231
|
subgraphDataByTypeName: Map<TypeName, EntityInterfaceSubgraphData>;
|
|
253
232
|
typeName: TypeName;
|
|
254
233
|
};
|
|
234
|
+
export type MutableParentDefinitionNode = MutableEnumNode | MutableInputObjectNode | MutableInterfaceNode | MutableObjectNode | MutableScalarNode | MutableUnionNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/schema-building/types/types.ts"],"names":[],"mappings":";;;AAuCA,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAO,CAAA;IACP,iDAAI,CAAA;IACJ,iDAAI,CAAA;AACN,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB"}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { type BooleanValueNode, type ConstDirectiveNode, type ConstValueNode, type
|
|
2
|
-
import { type AuthorizationData, type ChildData, type CompositeOutputData, type ConditionalFieldData, type DefinitionData, type EnumDefinitionData, type ExternalFieldData, type
|
|
3
|
-
import { type
|
|
1
|
+
import { type BooleanValueNode, type ConstDirectiveNode, type ConstValueNode, type EnumValueDefinitionNode, type EnumValueNode, type FieldDefinitionNode, type FloatValueNode, type InputValueDefinitionNode, type IntValueNode, Kind, type NullValueNode, OperationTypeNode, type StringValueNode, type TypeNode } from 'graphql';
|
|
2
|
+
import { type AuthorizationData, type ChildData, type CompositeOutputData, type ConditionalFieldData, type DefinitionData, type EnumDefinitionData, type EnumValueData, type ExternalFieldData, type FederatedDirectivesData, type FieldData, type InputObjectDefinitionData, type InterfaceDefinitionData, type NodeData, type ObjectDefinitionData, type ParentDefinitionData, type SchemaData } from './types/types';
|
|
3
|
+
import { type MutableFieldNode } from './ast';
|
|
4
4
|
import { type InterfaceTypeNode, type ObjectTypeNode, type ParentTypeNode } from '../ast/utils';
|
|
5
5
|
import { type SubscriptionFilterValue } from '../router-configuration/types';
|
|
6
6
|
import { type InputNodeKind, type OutputNodeKind } from '../utils/types';
|
|
7
7
|
import { type DirectiveName, type FieldName, type SubgraphName, type TypeName } from '../types/types';
|
|
8
|
-
import { type IsTypeValidImplementationParams } from './params';
|
|
9
|
-
|
|
8
|
+
import { type CompareAndValidateInputDefaultValuesParams, type DirectiveDefinitionNodeFromDataParams, type GetRouterFederatedDirectiveNodesParams, type IsTypeValidImplementationParams, type RouterSchemaFieldNodeFromDataParams, type RouterSchemaInputValueNodeFromDataParams, type RouterSchemaNodeFromDataParams, type SanitizeDefaultValueParams } from './types/params';
|
|
9
|
+
import { type GetFederatedDirectiveNodesResult, type RouterSchemaFieldNodeFromDataResult, type RouterSchemaInputValueNodeFromDataResult, type RouterSchemaNodeFromDataResult } from './types/results';
|
|
10
|
+
import { type ExecutionMultiResult, type ExecutionSingleFailureResult } from '../types/results';
|
|
11
|
+
import { type DirectiveArgumentData } from '../directive-definition-data/types/types';
|
|
12
|
+
export declare function newFederatedDirectivesData(): FederatedDirectivesData;
|
|
10
13
|
type IsNodeExternalOrShareableResult = {
|
|
11
14
|
isExternal: boolean;
|
|
12
15
|
isShareable: boolean;
|
|
@@ -15,8 +18,7 @@ export declare function isNodeExternalOrShareable(node: ObjectTypeNode | FieldDe
|
|
|
15
18
|
export declare function isTypeRequired(node: TypeNode): boolean;
|
|
16
19
|
export declare function isTypeNodeListType(node: TypeNode): boolean;
|
|
17
20
|
export declare function areDefaultValuesCompatible(typeNode: TypeNode, incomingDefaultValue: ConstValueNode): boolean;
|
|
18
|
-
export declare function
|
|
19
|
-
export declare function setMutualExecutableLocations(persistedDirectiveDefinitionData: PersistedDirectiveDefinitionData, incomingExecutableLocations: Set<string>): void;
|
|
21
|
+
export declare function compareAndValidateInputDefaultValues({ existingData, incomingData, }: CompareAndValidateInputDefaultValuesParams): ExecutionSingleFailureResult;
|
|
20
22
|
export declare function isTypeNameRootType(typeName: string, operationByTypeName: Map<TypeName, OperationTypeNode>): boolean;
|
|
21
23
|
export declare function getRenamedRootTypeName(typeName: string, operationByTypeName: Map<TypeName, OperationTypeNode>): string;
|
|
22
24
|
type ChildDefinitionNode = EnumValueDefinitionNode | FieldDefinitionNode | InputValueDefinitionNode;
|
|
@@ -25,15 +27,20 @@ export declare function setLongestDescription(existingData: DefinitionData, inco
|
|
|
25
27
|
export declare function isParentDataRootType(parentData: ParentDefinitionData): boolean;
|
|
26
28
|
export declare function isInterfaceDefinitionData(data: ParentDefinitionData): data is InterfaceDefinitionData;
|
|
27
29
|
export declare function setParentDataExtensionType(existingData: ParentDefinitionData, incomingData: ParentDefinitionData): void;
|
|
28
|
-
export declare function upsertDeprecatedDirective(
|
|
29
|
-
export declare function upsertTagDirectives(
|
|
30
|
+
export declare function upsertDeprecatedDirective(federatedDirectivesData: FederatedDirectivesData, incomingDirectiveNode: ConstDirectiveNode): void;
|
|
31
|
+
export declare function upsertTagDirectives(federatedDirectivesData: FederatedDirectivesData, incomingDirectiveNodes: ConstDirectiveNode[]): void;
|
|
30
32
|
export declare function propagateAuthDirectives(parentData: ParentDefinitionData, authData?: AuthorizationData): void;
|
|
31
33
|
export declare function propagateFieldAuthDirectives(fieldData: FieldData, authData?: AuthorizationData): void;
|
|
32
34
|
export declare function generateDeprecatedDirective(reason: string): ConstDirectiveNode;
|
|
33
|
-
export declare function
|
|
35
|
+
export declare function getNodeCoords(data: NodeData): string;
|
|
36
|
+
export declare function extractUniqueDirectiveNodes(directiveNodes: Array<ConstDirectiveNode>): Array<ConstDirectiveNode>;
|
|
37
|
+
export declare function getRouterSchemaDirectiveNodes({ data, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: GetRouterFederatedDirectiveNodesParams): GetFederatedDirectiveNodesResult;
|
|
38
|
+
export declare function getClientFederatedDirectiveNodes<T extends NodeData>(nodeData: T): ConstDirectiveNode[];
|
|
34
39
|
export declare function getClientSchemaFieldNodeByFieldData(fieldData: FieldData): MutableFieldNode;
|
|
35
|
-
export declare function
|
|
36
|
-
export declare function
|
|
40
|
+
export declare function routerSchemaFieldNodeFromData({ argumentNodes, data, description, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: RouterSchemaFieldNodeFromDataParams): RouterSchemaFieldNodeFromDataResult;
|
|
41
|
+
export declare function routerSchemaInputValueNodeFromData({ data, description, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: RouterSchemaInputValueNodeFromDataParams): RouterSchemaInputValueNodeFromDataResult;
|
|
42
|
+
export declare function routerSchemaNodeFromData<T extends ParentDefinitionData | EnumValueData>({ data, description, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: RouterSchemaNodeFromDataParams): RouterSchemaNodeFromDataResult<T['node']>;
|
|
43
|
+
export declare function propagateDirectiveDefinitionNodeFromData({ data, federatedDirectiveDataByName, parentDefinitionDataByTypeName, }: DirectiveDefinitionNodeFromDataParams): ExecutionMultiResult;
|
|
37
44
|
type InvalidFieldNames = {
|
|
38
45
|
byShareable: Set<string>;
|
|
39
46
|
subgraphNamesByExternalFieldName: Map<FieldName, Array<SubgraphName>>;
|
|
@@ -57,7 +64,7 @@ export declare function newConditionalFieldData(): ConditionalFieldData;
|
|
|
57
64
|
export declare function getDefinitionDataCoords(data: NodeData, useFederatedCoords: boolean): string;
|
|
58
65
|
export declare function isParentDataCompositeOutputType(data: ParentDefinitionData): data is ObjectDefinitionData | InterfaceDefinitionData;
|
|
59
66
|
export declare function newExternalFieldData(isDefinedExternal: boolean): ExternalFieldData;
|
|
60
|
-
export declare function getInitialFederatedDescription(data: NodeData): StringValueNode | undefined;
|
|
67
|
+
export declare function getInitialFederatedDescription(data: NodeData | DirectiveArgumentData): StringValueNode | undefined;
|
|
61
68
|
export declare function areKindsEqual<T extends ParentDefinitionData>(a: T, b: ParentDefinitionData): b is T;
|
|
62
69
|
export declare function isFieldData(data: ChildData | NodeData | SchemaData): data is FieldData;
|
|
63
70
|
export declare function isInputObjectDefinitionData(data: ParentDefinitionData): data is InputObjectDefinitionData;
|
|
@@ -65,4 +72,5 @@ export declare function isInputNodeKind(kind: Kind): kind is InputNodeKind;
|
|
|
65
72
|
export declare function isOutputNodeKind(kind: Kind): kind is OutputNodeKind;
|
|
66
73
|
export declare function isInterfaceNode(node: ParentTypeNode): node is InterfaceTypeNode;
|
|
67
74
|
export declare function isEnumData(data: ParentDefinitionData): data is EnumDefinitionData;
|
|
75
|
+
export declare function sanitizeDefaultValue({ data, namedTypeData, node }: SanitizeDefaultValueParams): void;
|
|
68
76
|
export {};
|