@theguild/federation-composition 0.21.0 → 0.21.1-alpha-20251210123959-4c5c3b3269089fef6f5100a41211716039d3d0e0

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.
@@ -133,7 +133,11 @@ function createSupergraphStateBuilder() {
133
133
  subgraphState.specs.cost.names.listSize;
134
134
  }
135
135
  }
136
+ const allFederationImports = new Set(subgraphState.federation.imports.map((i) => i.alias ?? i.name));
136
137
  for (const [typeName, type] of subgraphState.types) {
138
+ if (allFederationImports.has(typeName)) {
139
+ continue;
140
+ }
137
141
  switch (type.kind) {
138
142
  case "OBJECT": {
139
143
  objectType.visitSubgraphState(subgraphState.graph, state.objectTypes, typeName, type);
@@ -130,7 +130,11 @@ export function createSupergraphStateBuilder() {
130
130
  subgraphState.specs.cost.names.listSize;
131
131
  }
132
132
  }
133
+ const allFederationImports = new Set(subgraphState.federation.imports.map((i) => i.alias ?? i.name));
133
134
  for (const [typeName, type] of subgraphState.types) {
135
+ if (allFederationImports.has(typeName)) {
136
+ continue;
137
+ }
134
138
  switch (type.kind) {
135
139
  case "OBJECT": {
136
140
  objectType.visitSubgraphState(subgraphState.graph, state.objectTypes, typeName, type);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theguild/federation-composition",
3
- "version": "0.21.0",
3
+ "version": "0.21.1-alpha-20251210123959-4c5c3b3269089fef6f5100a41211716039d3d0e0",
4
4
  "description": "Open Source Composition library for Apollo Federation",
5
5
  "peerDependencies": {
6
6
  "graphql": "^16.0.0"