@graphql-tools/executor-http 1.3.3 → 1.3.4-alpha-bbff11b72169f1084cc6ca5d3578040e60fa0237
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 +6 -0
- package/dist/index.cjs +12 -3
- package/dist/index.js +12 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @graphql-tools/executor-http
|
|
2
2
|
|
|
3
|
+
## 1.3.4-alpha-bbff11b72169f1084cc6ca5d3578040e60fa0237
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1015](https://github.com/graphql-hive/gateway/pull/1015) [`c2a45c0`](https://github.com/graphql-hive/gateway/commit/c2a45c0957e41d506c7b6459cccf47dfaef63c58) Thanks [@ardatan](https://github.com/ardatan)! - Add `TypeError` to `originalError` prop of the error thrown when no `data` and `errors` found in the HTTP response, then GraphQL Servers know that it is an unexpected error so it should be masked and logged separately instead of leaking to the client
|
|
8
|
+
|
|
3
9
|
## 1.3.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -733,7 +733,10 @@ function buildHTTPExecutor(options) {
|
|
|
733
733
|
utils.createGraphQLError(
|
|
734
734
|
'Unexpected empty "data" and "errors" fields in result: ' + result,
|
|
735
735
|
{
|
|
736
|
-
extensions:
|
|
736
|
+
extensions: {
|
|
737
|
+
...upstreamErrorExtensions,
|
|
738
|
+
unexpected: true
|
|
739
|
+
}
|
|
737
740
|
}
|
|
738
741
|
)
|
|
739
742
|
]
|
|
@@ -764,7 +767,10 @@ function buildHTTPExecutor(options) {
|
|
|
764
767
|
utils.createGraphQLError(
|
|
765
768
|
`Unexpected response: ${JSON.stringify(result)}`,
|
|
766
769
|
{
|
|
767
|
-
extensions:
|
|
770
|
+
extensions: {
|
|
771
|
+
...upstreamErrorExtensions,
|
|
772
|
+
unexpected: true
|
|
773
|
+
},
|
|
768
774
|
originalError: e
|
|
769
775
|
}
|
|
770
776
|
)
|
|
@@ -775,7 +781,10 @@ function buildHTTPExecutor(options) {
|
|
|
775
781
|
return {
|
|
776
782
|
errors: [
|
|
777
783
|
utils.createGraphQLError("No response returned", {
|
|
778
|
-
extensions:
|
|
784
|
+
extensions: {
|
|
785
|
+
...upstreamErrorExtensions,
|
|
786
|
+
unexpected: true
|
|
787
|
+
}
|
|
779
788
|
})
|
|
780
789
|
]
|
|
781
790
|
};
|
package/dist/index.js
CHANGED
|
@@ -731,7 +731,10 @@ function buildHTTPExecutor(options) {
|
|
|
731
731
|
createGraphQLError(
|
|
732
732
|
'Unexpected empty "data" and "errors" fields in result: ' + result,
|
|
733
733
|
{
|
|
734
|
-
extensions:
|
|
734
|
+
extensions: {
|
|
735
|
+
...upstreamErrorExtensions,
|
|
736
|
+
unexpected: true
|
|
737
|
+
}
|
|
735
738
|
}
|
|
736
739
|
)
|
|
737
740
|
]
|
|
@@ -762,7 +765,10 @@ function buildHTTPExecutor(options) {
|
|
|
762
765
|
createGraphQLError(
|
|
763
766
|
`Unexpected response: ${JSON.stringify(result)}`,
|
|
764
767
|
{
|
|
765
|
-
extensions:
|
|
768
|
+
extensions: {
|
|
769
|
+
...upstreamErrorExtensions,
|
|
770
|
+
unexpected: true
|
|
771
|
+
},
|
|
766
772
|
originalError: e
|
|
767
773
|
}
|
|
768
774
|
)
|
|
@@ -773,7 +779,10 @@ function buildHTTPExecutor(options) {
|
|
|
773
779
|
return {
|
|
774
780
|
errors: [
|
|
775
781
|
createGraphQLError("No response returned", {
|
|
776
|
-
extensions:
|
|
782
|
+
extensions: {
|
|
783
|
+
...upstreamErrorExtensions,
|
|
784
|
+
unexpected: true
|
|
785
|
+
}
|
|
777
786
|
})
|
|
778
787
|
]
|
|
779
788
|
};
|
package/package.json
CHANGED