From 010b1d0e418d92fb2e54b69859865098a9681452 Mon Sep 17 00:00:00 2001 From: Jesse Rosenberger Date: Mon, 25 Oct 2021 18:37:40 +0300 Subject: [PATCH] port: maintain support for core@v0.1 behavior (#119) This brings the same contribution that @sachindshinde offered up in https://github.com/apollographql/federation/pull/1081 which I believe to be important for us to land on our current working branch as well (since otherwise I think it will get stomped on and lost) --- core-js/src/supergraphs.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/core-js/src/supergraphs.ts b/core-js/src/supergraphs.ts index 31fa2e1ea..1be79d5e2 100644 --- a/core-js/src/supergraphs.ts +++ b/core-js/src/supergraphs.ts @@ -62,10 +62,7 @@ function checkFeatureSupport(coreFeatures: CoreFeatures) { } for (const feature of coreFeatures.allFeatures()) { - if (!feature.purpose) { - continue; - } - if (feature.purpose === 'EXECUTION' || feature.purpose === 'SECURITY') { + if (feature.url.equals(coreVersionZeroDotOneUrl) || feature.purpose === 'EXECUTION' || feature.purpose === 'SECURITY') { if (!SUPPORTED_FEATURES.has(feature.url.base.toString())) { errors.push(ErrUnsupportedFeature(feature)); }