Skip to content

Commit 53db005

Browse files
authored
feat(utils): Add subgraphName to ExecutionRequest type (#7281)
1 parent f7fca14 commit 53db005

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.changeset/three-impalas-love.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphql-tools/utils': minor
3+
---
4+
5+
Add optional `subgraphName` preoperty to the `ExecutionRequest` interface for usage in Gateways like
6+
Hive Gateway.

packages/utils/src/Interfaces.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ export interface ExecutionRequest<
8989
rootValue?: TRootValue;
9090
// If the request originates within execution of a parent request, it may contain the parent context and info
9191
context?: TContext;
92+
// If the request originates within a supergraph execution, it may contain the target subgraph name
93+
subgraphName?: string;
9294
info?: GraphQLResolveInfo;
9395
signal?: AbortSignal;
9496
}

0 commit comments

Comments
 (0)