Skip to content

Commit

Permalink
fix(federation): check all final types to find orphan interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed May 2, 2024
1 parent a6f0490 commit 361052a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/warm-ladybugs-wait.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@graphql-tools/federation": patch
---

Small fix: check all final types to find orphan interfaces
2 changes: 1 addition & 1 deletion packages/federation/src/supergraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ export function getSubschemasFromSupergraphSdl({
});
const extendedSubgraphTypes = [...subgraphTypes, ...extraOrphanTypesForSubgraph.values()];
// We should add implemented objects from other subgraphs implemented by this interface
for (const interfaceInSubgraph of subgraphTypes) {
for (const interfaceInSubgraph of extendedSubgraphTypes) {
if (interfaceInSubgraph.kind === Kind.INTERFACE_TYPE_DEFINITION) {
for (const definitionNode of supergraphAst.definitions) {
if (
Expand Down

0 comments on commit 361052a

Please sign in to comment.