Skip to content

Commit a3f1ea9

Browse files
authored
Add debug logs to federation composition (#6719)
1 parent 1e28970 commit a3f1ea9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/services/schema/src/orchestrators.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,17 +175,23 @@ const createFederation: (
175175
async ({ schemas, external, native, contracts }) => {
176176
const subgraphs = schemas
177177
.map(schema => {
178+
logger.debug(`Parsing subgraph schema SDL (name=%s)`, schema.source);
178179
return {
179180
typeDefs: trimDescriptions(parse(schema.raw)),
180181
name: schema.source,
181182
url: 'url' in schema && typeof schema.url === 'string' ? schema.url : undefined,
182183
};
183184
})
184185
.map(subgraph => {
186+
logger.debug(`Extracting link implementations from subgraph (name=%s)`, subgraph.name);
185187
const { matchesImplementation, resolveImportName } = extractLinkImplementations(
186188
subgraph.typeDefs,
187189
);
188190
if (matchesImplementation('https://specs.graphql-hive.com/hive', 'v1.0')) {
191+
logger.debug(
192+
`Found hive link in subgraph. Applying link logic. (name=%s)`,
193+
subgraph.name,
194+
);
189195
// if this subgraph implements the metadata spec
190196
// then copy metadata from the schema to all fields.
191197
// @note this is similar to how federation's compose copies join__ directives to fields based on the

0 commit comments

Comments
 (0)