Skip to content

Commit 282401f

Browse files
committed
executionrequest is rootmost, avoid polluting child
1 parent 9bf21e8 commit 282401f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

packages/runtime/src/plugins/useSubgraphExecuteDebug.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,12 @@ export function useSubgraphExecuteDebug<
1111
fetchAPI = yoga.fetchAPI;
1212
},
1313
onSubgraphExecute({ executionRequest }) {
14-
let log = executionRequest.context?.log.child({
15-
subgraphExecuteId: fetchAPI.crypto.randomUUID(),
16-
});
14+
let log = executionRequest.context?.log.child(
15+
'[useSubgraphExecuteDebug] ',
16+
);
1717
if (!log) {
1818
throw new Error('Logger is not available in the execution context');
1919
}
20-
// we intentionally mutate the executionRequest context here
21-
// to avoid losing the context ref and improve perf
22-
executionRequest.context!.log = log;
23-
log = log.child('[useSubgraphExecuteDebug] ');
2420
log.debug(() => {
2521
const logData: Record<string, any> = {};
2622
if (executionRequest.document) {

0 commit comments

Comments
 (0)