Skip to content

Commit 98b64f7

Browse files
committed
enhance(runtime/debug/log): log debug info after all other plugins are invoked
1 parent 63949a2 commit 98b64f7

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.changeset/tame-bulldogs-march.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-hive/gateway-runtime': patch
3+
---
4+
5+
Log Fetch calls, subgraph execution and delegation plan generation after all other plugins are invoked

packages/runtime/src/createGatewayRuntime.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -926,15 +926,6 @@ export function createGatewayRuntime<
926926
useRequestId(),
927927
];
928928

929-
logger.debug(() => {
930-
basePlugins.push(
931-
useSubgraphExecuteDebug(configContext),
932-
useFetchDebug(configContext),
933-
useDelegationPlanDebug(configContext),
934-
);
935-
return 'Debug mode enabled';
936-
});
937-
938929
const extraPlugins = [];
939930

940931
if (config.webhooks) {
@@ -1016,6 +1007,15 @@ export function createGatewayRuntime<
10161007
extraPlugins.push(useUpstreamRetry(config.upstreamRetry));
10171008
}
10181009

1010+
logger.debug(() => {
1011+
extraPlugins.push(
1012+
useSubgraphExecuteDebug(configContext),
1013+
useFetchDebug(configContext),
1014+
useDelegationPlanDebug(configContext),
1015+
);
1016+
return 'Debug mode enabled';
1017+
});
1018+
10191019
const yoga = createYoga<any, GatewayContext & TContext>({
10201020
// @ts-expect-error Types???
10211021
schema: unifiedGraph,

0 commit comments

Comments
 (0)