@apollo/federation-internals 2.12.1 → 2.13.0-preview.0
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/argumentCompositionStrategies.d.ts +1 -2
- package/dist/argumentCompositionStrategies.d.ts.map +1 -1
- package/dist/argumentCompositionStrategies.js +2 -24
- package/dist/argumentCompositionStrategies.js.map +1 -1
- package/dist/definitions.d.ts +0 -1
- package/dist/definitions.d.ts.map +1 -1
- package/dist/definitions.js +1 -5
- package/dist/definitions.js.map +1 -1
- package/dist/error.d.ts +1 -1
- package/dist/error.js +2 -2
- package/dist/error.js.map +1 -1
- package/dist/federation.d.ts +2 -2
- package/dist/federation.d.ts.map +1 -1
- package/dist/federation.js +15 -12
- package/dist/federation.js.map +1 -1
- package/dist/specs/authenticatedSpec.d.ts.map +1 -1
- package/dist/specs/authenticatedSpec.js.map +1 -1
- package/dist/specs/connectSpec.d.ts.map +1 -1
- package/dist/specs/connectSpec.js +2 -1
- package/dist/specs/connectSpec.js.map +1 -1
- package/dist/specs/federationSpec.d.ts.map +1 -1
- package/dist/specs/federationSpec.js +2 -1
- package/dist/specs/federationSpec.js.map +1 -1
- package/dist/specs/policySpec.d.ts.map +1 -1
- package/dist/specs/policySpec.js.map +1 -1
- package/dist/specs/requiresScopesSpec.d.ts.map +1 -1
- package/dist/specs/requiresScopesSpec.js.map +1 -1
- package/package.json +1 -1
- package/src/argumentCompositionStrategies.ts +4 -38
- package/src/definitions.ts +0 -4
- package/src/error.ts +4 -4
- package/src/federation.ts +20 -21
- package/src/specs/authenticatedSpec.ts +0 -4
- package/src/specs/connectSpec.ts +6 -0
- package/src/specs/federationSpec.ts +2 -1
- package/src/specs/policySpec.ts +0 -4
- package/src/specs/requiresScopesSpec.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requiresScopesSpec.js","sourceRoot":"","sources":["../../src/specs/requiresScopesSpec.ts"],"names":[],"mappings":";;;AAAA,q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AC,IAAI,4BAA4B,CAAC,IAAI,yBAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAEpE,IAAA,wCAAoB,EAAC,gCAAwB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -65,9 +65,8 @@ function unionValues(values: any[]): any {
|
|
|
65
65
|
/**
|
|
66
66
|
* Performs conjunction of 2d arrays that represent conditions in Disjunctive Normal Form.
|
|
67
67
|
*
|
|
68
|
-
* Each
|
|
69
|
-
* *
|
|
70
|
-
* * Outer array is interpreted as the disjunction (an OR) of the inner arrays.
|
|
68
|
+
* * Each inner array is interpreted as the conjunction of the conditions in the array.
|
|
69
|
+
* * The top-level array is interpreted as the disjunction of the inner arrays
|
|
71
70
|
*
|
|
72
71
|
* Algorithm
|
|
73
72
|
* * filter out duplicate entries to limit the amount of necessary computations
|
|
@@ -75,19 +74,12 @@ function unionValues(values: any[]): any {
|
|
|
75
74
|
* * simplify combinations by dropping duplicate conditions (i.e. p ^ p = p, p ^ q = q ^ p)
|
|
76
75
|
* * eliminate entries that are subsumed by others (i.e. (p ^ q) subsumes (p ^ q ^ r))
|
|
77
76
|
*/
|
|
78
|
-
|
|
77
|
+
function dnfConjunction<T>(values: T[][][]): T[][] {
|
|
79
78
|
// should never be the case
|
|
80
79
|
if (values.length == 0) {
|
|
81
80
|
return [];
|
|
82
81
|
}
|
|
83
82
|
|
|
84
|
-
// Copy the 2D arrays, as we'll be modifying them below (due to sorting).
|
|
85
|
-
for (let i = 0; i < values.length; i++) {
|
|
86
|
-
// See the doc string for `convertEmptyToTrue()` to understand why this is
|
|
87
|
-
// necessary.
|
|
88
|
-
values[i] = convertEmptyToTrue(dnfCopy(values[i]));
|
|
89
|
-
}
|
|
90
|
-
|
|
91
83
|
// we first filter out duplicate values from candidates
|
|
92
84
|
// this avoids exponential computation of exactly the same conditions
|
|
93
85
|
const filtered = filterNestedArrayDuplicates(values);
|
|
@@ -127,14 +119,7 @@ function filterNestedArrayDuplicates<T>(values: T[][][]): T[][][] {
|
|
|
127
119
|
const filtered: T[][][] = [];
|
|
128
120
|
const seen = new Set<string>;
|
|
129
121
|
values.forEach((value) => {
|
|
130
|
-
value.
|
|
131
|
-
inner.sort();
|
|
132
|
-
})
|
|
133
|
-
value.sort((a, b) => {
|
|
134
|
-
const left = JSON.stringify(a);
|
|
135
|
-
const right = JSON.stringify(b);
|
|
136
|
-
return left > right ? 1 : left < right ? -1 : 0;
|
|
137
|
-
});
|
|
122
|
+
value.sort();
|
|
138
123
|
const key = JSON.stringify(value);
|
|
139
124
|
if (!seen.has(key)) {
|
|
140
125
|
seen.add(key);
|
|
@@ -175,25 +160,6 @@ function deduplicateSubsumedValues<T>(values: T[][]): T[][] {
|
|
|
175
160
|
return result;
|
|
176
161
|
}
|
|
177
162
|
|
|
178
|
-
function dnfCopy<T>(value: T[][]): T[][] {
|
|
179
|
-
const newValue = new Array(value.length);
|
|
180
|
-
for (let i = 0; i < value.length; i++) {
|
|
181
|
-
newValue[i] = value[i].slice();
|
|
182
|
-
}
|
|
183
|
-
return newValue;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Normally for DNF, you'd consider [] to be always false and [[]] to be always
|
|
188
|
-
* true, and code that uses some()/every() needs no special-casing to work with
|
|
189
|
-
* these definitions. However, router special-cases [] to also mean true, and so
|
|
190
|
-
* if we're about to do any evaluation on DNFs, we need to do these conversions
|
|
191
|
-
* beforehand.
|
|
192
|
-
*/
|
|
193
|
-
export function convertEmptyToTrue<T>(value: T[][]): T[][] {
|
|
194
|
-
return value.length === 0 ? [[]] : value;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
163
|
export const ARGUMENT_COMPOSITION_STRATEGIES = {
|
|
198
164
|
MAX: {
|
|
199
165
|
name: 'MAX',
|
package/src/definitions.ts
CHANGED
|
@@ -3825,7 +3825,3 @@ function copyDirectiveDefinitionInner(
|
|
|
3825
3825
|
export function isFieldDefinition(elem: SchemaElement<any, any>): elem is FieldDefinition<any> {
|
|
3826
3826
|
return elem instanceof FieldDefinition;
|
|
3827
3827
|
}
|
|
3828
|
-
|
|
3829
|
-
export function isElementNamedType(elem: SchemaElement<any, any>): elem is NamedType {
|
|
3830
|
-
return elem instanceof BaseNamedType;
|
|
3831
|
-
}
|
package/src/error.ts
CHANGED
|
@@ -633,9 +633,9 @@ const MAX_VALIDATION_SUBGRAPH_PATHS_EXCEEDED = makeCodeDefinition(
|
|
|
633
633
|
{ addedIn: '2.8.0' },
|
|
634
634
|
);
|
|
635
635
|
|
|
636
|
-
const
|
|
637
|
-
'
|
|
638
|
-
'The @authenticated, @requiresScopes and @policy directive cannot be applied on interface, interface
|
|
636
|
+
const AUTHENTICATION_APPLIED_ON_INTERFACE = makeCodeDefinition(
|
|
637
|
+
'AUTHENTICATION_APPLIED_ON_INTERFACE',
|
|
638
|
+
'The @authenticated, @requiresScopes and @policy directive cannot be applied on interface, interface object or their fields.',
|
|
639
639
|
{ addedIn: '2.9.4' },
|
|
640
640
|
);
|
|
641
641
|
|
|
@@ -746,7 +746,7 @@ export const ERRORS = {
|
|
|
746
746
|
LIST_SIZE_INVALID_SIZED_FIELD,
|
|
747
747
|
LIST_SIZE_INVALID_SLICING_ARGUMENT,
|
|
748
748
|
MAX_VALIDATION_SUBGRAPH_PATHS_EXCEEDED,
|
|
749
|
-
|
|
749
|
+
AUTHENTICATION_APPLIED_ON_INTERFACE,
|
|
750
750
|
MISSING_TRANSITIVE_AUTH_REQUIREMENTS,
|
|
751
751
|
};
|
|
752
752
|
|
package/src/federation.ts
CHANGED
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
isWrapperType,
|
|
38
38
|
possibleRuntimeTypes,
|
|
39
39
|
isIntType,
|
|
40
|
-
Type, isFieldDefinition,
|
|
40
|
+
Type, isFieldDefinition,
|
|
41
41
|
} from "./definitions";
|
|
42
42
|
import { assert, MultiMap, printHumanReadableList, OrderedMap, mapValues, assertUnreachable } from "./utils";
|
|
43
43
|
import { SDLValidationRule } from "graphql/validation/ValidationContext";
|
|
@@ -1071,7 +1071,7 @@ function validateListSizeAppliedToList(
|
|
|
1071
1071
|
) {
|
|
1072
1072
|
const { sizedFields = [] } = application.arguments();
|
|
1073
1073
|
// @listSize must be applied to a list https://ibm.github.io/graphql-specs/cost-spec.html#sec-Valid-List-Size-Target
|
|
1074
|
-
if (!sizedFields.length && parent.type && !isListType(parent.type)
|
|
1074
|
+
if (!sizedFields.length && parent.type && !isListType(parent.type)) {
|
|
1075
1075
|
errorCollector.push(ERRORS.LIST_SIZE_APPLIED_TO_NON_LIST.err(
|
|
1076
1076
|
`"${parent.coordinate}" is not a list`,
|
|
1077
1077
|
{ nodes: sourceASTs(application, parent) },
|
|
@@ -1141,9 +1141,8 @@ function validateSizedFieldsAreValidLists(
|
|
|
1141
1141
|
) {
|
|
1142
1142
|
const { sizedFields = [] } = application.arguments();
|
|
1143
1143
|
// Validate sizedFields https://ibm.github.io/graphql-specs/cost-spec.html#sec-Valid-Sized-Fields-Target
|
|
1144
|
-
if (sizedFields.length
|
|
1145
|
-
|
|
1146
|
-
if (!isCompositeType(baseParentType)) {
|
|
1144
|
+
if (sizedFields.length) {
|
|
1145
|
+
if (!parent.type || !isCompositeType(parent.type)) {
|
|
1147
1146
|
// The output type must have fields
|
|
1148
1147
|
errorCollector.push(ERRORS.LIST_SIZE_INVALID_SIZED_FIELD.err(
|
|
1149
1148
|
`Sized fields cannot be used because "${parent.type}" is not a composite type`,
|
|
@@ -1151,11 +1150,11 @@ function validateSizedFieldsAreValidLists(
|
|
|
1151
1150
|
));
|
|
1152
1151
|
} else {
|
|
1153
1152
|
for (const sizedFieldName of sizedFields) {
|
|
1154
|
-
const sizedField =
|
|
1153
|
+
const sizedField = parent.type.field(sizedFieldName);
|
|
1155
1154
|
if (!sizedField) {
|
|
1156
1155
|
// Sized fields must be present on the output type
|
|
1157
1156
|
errorCollector.push(ERRORS.LIST_SIZE_INVALID_SIZED_FIELD.err(
|
|
1158
|
-
`Sized field "${sizedFieldName}" is not a field on type "${
|
|
1157
|
+
`Sized field "${sizedFieldName}" is not a field on type "${parent.type.coordinate}"`,
|
|
1159
1158
|
{ nodes: sourceASTs(application, parent) }
|
|
1160
1159
|
));
|
|
1161
1160
|
} else if (!sizedField.type || !(isListType(sizedField.type) || isNonNullListType(sizedField.type))) {
|
|
@@ -1847,7 +1846,7 @@ export class FederationBlueprint extends SchemaBlueprint {
|
|
|
1847
1846
|
validateSizedFieldsAreValidLists(application, parent, errorCollector);
|
|
1848
1847
|
}
|
|
1849
1848
|
|
|
1850
|
-
// Validate @authenticated, @requireScopes and @policy
|
|
1849
|
+
// Validate @authenticated, @requireScopes and @policy
|
|
1851
1850
|
validateNoAuthenticationOnInterfaces(metadata, errorCollector);
|
|
1852
1851
|
|
|
1853
1852
|
return errorCollector;
|
|
@@ -1964,9 +1963,9 @@ export function setSchemaAsFed2Subgraph(schema: Schema, useLatest: boolean = fal
|
|
|
1964
1963
|
|
|
1965
1964
|
// This is the full @link declaration as added by `asFed2SubgraphDocument`. It's here primarily for uses by tests that print and match
|
|
1966
1965
|
// subgraph schema to avoid having to update 20+ tests every time we use a new directive or the order of import changes ...
|
|
1967
|
-
export const FEDERATION2_LINK_WITH_FULL_IMPORTS = '@link(url: "https://specs.apollo.dev/federation/v2.
|
|
1966
|
+
export const FEDERATION2_LINK_WITH_FULL_IMPORTS = '@link(url: "https://specs.apollo.dev/federation/v2.13", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject", "@authenticated", "@requiresScopes", "@policy", "@context", "@fromContext", "@cost", "@listSize", "@cacheTag"])';
|
|
1968
1967
|
// This is the full @link declaration that is added when upgrading fed v1 subgraphs to v2 version. It should only be used by tests.
|
|
1969
|
-
export const FEDERATION2_LINK_WITH_AUTO_EXPANDED_IMPORTS = '@link(url: "https://specs.apollo.dev/federation/v2.
|
|
1968
|
+
export const FEDERATION2_LINK_WITH_AUTO_EXPANDED_IMPORTS = '@link(url: "https://specs.apollo.dev/federation/v2.13", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject"])';
|
|
1970
1969
|
|
|
1971
1970
|
// This is the federation @link for tests that go through the SchemaUpgrader.
|
|
1972
1971
|
export const FEDERATION2_LINK_WITH_AUTO_EXPANDED_IMPORTS_UPGRADED = '@link(url: "https://specs.apollo.dev/federation/v2.4", import: ["@key", "@requires", "@provides", "@external", "@tag", "@extends", "@shareable", "@inaccessible", "@override", "@composeDirective", "@interfaceObject"])';
|
|
@@ -2908,15 +2907,15 @@ function validateNoAuthenticationOnInterfaces(metadata: FederationMetadata, erro
|
|
|
2908
2907
|
const policyDirective = metadata.policyDirective();
|
|
2909
2908
|
[authenticatedDirective, requiresScopesDirective, policyDirective].forEach((directive) => {
|
|
2910
2909
|
for (const application of directive.applications()) {
|
|
2911
|
-
const element
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
)
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
) {
|
|
2910
|
+
const element = application.parent;
|
|
2911
|
+
function isAppliedOnInterface(type: Type) {
|
|
2912
|
+
return isInterfaceType(type) || isInterfaceObjectType(baseType(type));
|
|
2913
|
+
}
|
|
2914
|
+
function isAppliedOnInterfaceField(elem: SchemaElement<any, any>) {
|
|
2915
|
+
return isFieldDefinition(elem) && isAppliedOnInterface(elem.parent);
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
if (isAppliedOnInterface(element) || isAppliedOnInterfaceField(element)) {
|
|
2920
2919
|
let kind = '';
|
|
2921
2920
|
switch (element.kind) {
|
|
2922
2921
|
case 'FieldDefinition':
|
|
@@ -2929,8 +2928,8 @@ function validateNoAuthenticationOnInterfaces(metadata: FederationMetadata, erro
|
|
|
2929
2928
|
kind = 'interface object';
|
|
2930
2929
|
break;
|
|
2931
2930
|
}
|
|
2932
|
-
errorCollector.push(ERRORS.
|
|
2933
|
-
`Invalid use of @${directive.name} on ${kind} "${element.coordinate}": @${directive.name} cannot be applied on interfaces, interface
|
|
2931
|
+
errorCollector.push(ERRORS.AUTHENTICATION_APPLIED_ON_INTERFACE.err(
|
|
2932
|
+
`Invalid use of @${directive.name} on ${kind} "${element.coordinate}": @${directive.name} cannot be applied on interfaces, interface objects or their fields`,
|
|
2934
2933
|
{nodes: sourceASTs(application, element.parent)},
|
|
2935
2934
|
));
|
|
2936
2935
|
}
|
|
@@ -24,10 +24,6 @@ export class AuthenticatedSpecDefinition extends FeatureDefinition {
|
|
|
24
24
|
minimumFederationVersion,
|
|
25
25
|
);
|
|
26
26
|
|
|
27
|
-
// WARNING: we cannot declare staticArgumentTransform() as access control merge logic needs to propagate
|
|
28
|
-
// requirements upwards/downwards between types and interfaces. We hijack the merge process by providing
|
|
29
|
-
// implementations/interfaces as "additional sources". This means that we cannot apply staticArgumentTransform()
|
|
30
|
-
// as subgraph index index will be wrong/undefined.
|
|
31
27
|
this.registerDirective(createDirectiveSpecification({
|
|
32
28
|
name: AuthenticatedSpecDefinition.directiveName,
|
|
33
29
|
locations: [
|
package/src/specs/connectSpec.ts
CHANGED
|
@@ -383,6 +383,12 @@ export const CONNECT_VERSIONS = new FeatureDefinitions<ConnectSpecDefinition>(
|
|
|
383
383
|
new FeatureVersion(0, 3),
|
|
384
384
|
new FeatureVersion(2, 12),
|
|
385
385
|
),
|
|
386
|
+
)
|
|
387
|
+
.add(
|
|
388
|
+
new ConnectSpecDefinition(
|
|
389
|
+
new FeatureVersion(0, 4),
|
|
390
|
+
new FeatureVersion(2, 13),
|
|
391
|
+
),
|
|
386
392
|
);
|
|
387
393
|
|
|
388
394
|
registerKnownFeature(CONNECT_VERSIONS);
|
|
@@ -211,6 +211,7 @@ export const FEDERATION_VERSIONS = new FeatureDefinitions<FederationSpecDefiniti
|
|
|
211
211
|
.add(new FederationSpecDefinition(new FeatureVersion(2, 9)))
|
|
212
212
|
.add(new FederationSpecDefinition(new FeatureVersion(2, 10)))
|
|
213
213
|
.add(new FederationSpecDefinition(new FeatureVersion(2, 11)))
|
|
214
|
-
.add(new FederationSpecDefinition(new FeatureVersion(2, 12)))
|
|
214
|
+
.add(new FederationSpecDefinition(new FeatureVersion(2, 12)))
|
|
215
|
+
.add(new FederationSpecDefinition(new FeatureVersion(2, 13)));
|
|
215
216
|
|
|
216
217
|
registerKnownFeature(FEDERATION_VERSIONS);
|
package/src/specs/policySpec.ts
CHANGED
|
@@ -31,10 +31,6 @@ export class PolicySpecDefinition extends FeatureDefinition {
|
|
|
31
31
|
|
|
32
32
|
this.registerType(createScalarTypeSpecification({ name: PolicyTypeName.POLICY }));
|
|
33
33
|
|
|
34
|
-
// WARNING: we cannot declare staticArgumentTransform() as access control merge logic needs to propagate
|
|
35
|
-
// requirements upwards/downwards between types and interfaces. We hijack the merge process by providing
|
|
36
|
-
// implementations/interfaces as "additional sources". This means that we cannot apply staticArgumentTransform()
|
|
37
|
-
// as subgraph index index will be wrong/undefined.
|
|
38
34
|
this.registerDirective(createDirectiveSpecification({
|
|
39
35
|
name: PolicySpecDefinition.directiveName,
|
|
40
36
|
args: [{
|
|
@@ -32,10 +32,6 @@ export class RequiresScopesSpecDefinition extends FeatureDefinition {
|
|
|
32
32
|
|
|
33
33
|
this.registerType(createScalarTypeSpecification({ name: RequiresScopesTypeName.SCOPE }));
|
|
34
34
|
|
|
35
|
-
// WARNING: we cannot declare staticArgumentTransform() as access control merge logic needs to propagate
|
|
36
|
-
// requirements upwards/downwards between types and interfaces. We hijack the merge process by providing
|
|
37
|
-
// implementations/interfaces as "additional sources". This means that we cannot apply staticArgumentTransform()
|
|
38
|
-
// as subgraph index index will be wrong/undefined.
|
|
39
35
|
this.registerDirective(createDirectiveSpecification({
|
|
40
36
|
name: RequiresScopesSpecDefinition.directiveName,
|
|
41
37
|
args: [{
|