@graphql-tools/executor-http 3.1.4 → 3.2.0-alpha-cbec8f1108fe6a7a06eaebd7200c5fb91f50db05
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @graphql-tools/executor-http
|
|
2
2
|
|
|
3
|
+
## 3.2.0-alpha-cbec8f1108fe6a7a06eaebd7200c5fb91f50db05
|
|
4
|
+
### Minor Changes
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- [#2211](https://github.com/graphql-hive/gateway/pull/2211) [`3e4187b`](https://github.com/graphql-hive/gateway/commit/3e4187b340801fee45df8df891617afcfc8b4b30) Thanks [@ardatan](https://github.com/ardatan)! - Add `onHTTPResponse` hook to get `Response` returned by `fetch`;
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
import { buildHTTPExecutor } from '@graphql-tools/executor-http';
|
|
12
|
+
|
|
13
|
+
const executor = buildHTTPExecutor({
|
|
14
|
+
onHTTPResponse(response) {
|
|
15
|
+
console.log('Received response with status:', response.status);
|
|
16
|
+
},
|
|
17
|
+
});
|
|
18
|
+
```
|
|
19
|
+
|
|
3
20
|
## 3.1.4
|
|
4
21
|
### Patch Changes
|
|
5
22
|
|
package/dist/index.cjs
CHANGED
|
@@ -699,6 +699,7 @@ function buildHTTPExecutor(options) {
|
|
|
699
699
|
),
|
|
700
700
|
(fetchResult) => promiseHelpers.handleMaybePromise(
|
|
701
701
|
() => {
|
|
702
|
+
options?.onHTTPResponse?.(fetchResult);
|
|
702
703
|
upstreamErrorExtensions.response ||= {};
|
|
703
704
|
upstreamErrorExtensions.response.status = fetchResult.status;
|
|
704
705
|
upstreamErrorExtensions.response.statusText = fetchResult.statusText;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -697,6 +697,7 @@ function buildHTTPExecutor(options) {
|
|
|
697
697
|
),
|
|
698
698
|
(fetchResult) => handleMaybePromise(
|
|
699
699
|
() => {
|
|
700
|
+
options?.onHTTPResponse?.(fetchResult);
|
|
700
701
|
upstreamErrorExtensions.response ||= {};
|
|
701
702
|
upstreamErrorExtensions.response.status = fetchResult.status;
|
|
702
703
|
upstreamErrorExtensions.response.statusText = fetchResult.statusText;
|
package/package.json
CHANGED