From 2271e2f2e7fe6cda2d09965a5e8fa96b920a7a24 Mon Sep 17 00:00:00 2001 From: Chris Lenfest Date: Wed, 2 Apr 2025 14:41:20 -0500 Subject: [PATCH] Fix how we check for inconsistent entities --- composition-js/src/merging/merge.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composition-js/src/merging/merge.ts b/composition-js/src/merging/merge.ts index 3c397a9b2..11975a65a 100644 --- a/composition-js/src/merging/merge.ts +++ b/composition-js/src/merging/merge.ts @@ -1118,7 +1118,7 @@ class Merger { supergraphElement: dest, subgraphElements: sources, // All we use the string of the next line for is to categorize source with a @key of the others. - elementToString: type => type.hasAppliedDirective('key') ? 'yes' : 'no', + elementToString: type => sourceAsEntity.find(entity => entity === type) ? 'yes' : 'no', // Note that the first callback is for element that are "like the supergraph". As the supergraph has no @key ... supergraphElementPrinter: (_, subgraphs) => `it has no @key in ${subgraphs}`, otherElementsPrinter: (_, subgraphs) => ` but has some @key in ${subgraphs}`,