Skip to content

Commit 3c01ddf

Browse files
committed
Questionable deletions
1 parent 1da7d4d commit 3c01ddf

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

gateway-js/src/core/__tests__/core.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ describe('core v0.1', () => {
88
const supergraphSdl = `#graphql
99
schema
1010
@core(feature: "https://specs.apollo.dev/core/v0.1")
11-
@core(feature: "https://specs.apollo.dev/join/v0.1")
11+
@core(feature: "https://specs.apollo.dev/join/v0.1") {
1212
query: Query
1313
}
1414

query-planner-js/src/composedSchema/buildComposedSchema.ts

+1-25
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
buildASTSchema,
33
DocumentNode,
4-
GraphQLError,
54
GraphQLSchema,
65
isEnumType,
76
isIntrospectionType,
@@ -28,6 +27,7 @@ import {
2827
// of differentiating between features that require runtime support and those
2928
// that can be silently ignored, without enumerating features explicitly.
3029
export const supportedFeatures: ParsedFeatureURL[] = [
30+
'https://specs.apollo.dev/core/v0.1',
3131
'https://specs.apollo.dev/core/v0.2',
3232
'https://specs.apollo.dev/join/v0.1',
3333
'https://specs.apollo.dev/inaccessible/v0.1',
@@ -49,30 +49,6 @@ export function buildComposedSchema(document: DocumentNode): GraphQLSchema {
4949
// spec here, and use the collected features to validate feature
5050
// versions and handle renames.
5151

52-
const coreDirectivesArgs = getArgumentValuesForRepeatableDirective(
53-
coreDirective,
54-
schema.astNode!,
55-
);
56-
57-
for (const coreDirectiveArgs of coreDirectivesArgs) {
58-
const feature = parseFeatureURL(coreDirectiveArgs['feature']);
59-
60-
// TODO: Replace strict feature matching with version satisfaction from the
61-
// Core Schema spec.
62-
if (
63-
!supportedFeatures.some(
64-
(supportedFeature) =>
65-
supportedFeature.identity === feature.identity &&
66-
supportedFeature.version === feature.version,
67-
)
68-
) {
69-
throw new GraphQLError(
70-
`Unsupported core schema feature and/or version: ${feature}`,
71-
schema.astNode!,
72-
);
73-
}
74-
}
75-
7652
const joinName = 'join';
7753

7854
function getJoinDirective(name: string) {

0 commit comments

Comments
 (0)