@@ -14,6 +14,7 @@ v2 includes several breaking changes and improvements over v1. The most signific
14
14
- [ Disabled Automatic Forking] ( #disabled-automatic-forking )
15
15
- [ New Hive Logger for next-level observability and debugging] ( #hive-logger )
16
16
- [ New OpenTelemetry integration for better traces and custom spans] ( #opentelemetry )
17
+ - [ Subgraph Name is now part of the Execution Request] ( # )
17
18
18
19
## Drop Support for Node v18
19
20
@@ -566,7 +567,8 @@ informations.
566
567
567
568
#### Example with HTTP OTLP Exporter
568
569
569
- <Tabs items = { [<div >Hive Gateway <code >openTelemetrySetup()</code > (recommended)</div >, <div >OpenTelemetry <code >NodeSDK</code ></div >]} >
570
+ <Tabs items = { [<div >Hive Gateway <code >openTelemetrySetup()</code > (recommended)</div >,
571
+ <div >OpenTelemetry <code >NodeSDK</code ></div >]} >
570
572
571
573
<Tabs.Tab >
572
574
@@ -817,3 +819,22 @@ export const myPlugin = () => ({
817
819
}
818
820
})
819
821
```
822
+
823
+ ## Subgraph Name in Execution Request
824
+
825
+ The targeted subgraph name is now exposed as a field of ` ExecutionRequest ` , it is no longer needed
826
+ to use ` subgraphNameFromExecutionRequest ` to know which subgraph is targeted by an execution
827
+ request.
828
+
829
+ The ` subgraphNameFromExecutionRequest ` has been removed, since it's no longer needed.
830
+
831
+ ``` diff
832
+ - import { subgraphNameByExecutionRequest } from '@graphql-mesh/fusion-runtime';
833
+
834
+ const useMyPlugin = () => ({
835
+ onFetch({ executionRequest }) {
836
+ - const subgraphName = subgraphNameByExecutionRequest.get(executionRequest)
837
+ + const subgraphName = executionRequest.subgraphName
838
+ }
839
+ })
840
+ ```
0 commit comments