@graphql-tools/executor-http 3.0.6-hive-router-query-planner-47d9b70e8c1b31ec9769d305a5c17769d4983c5e → 3.0.6-hive-router-query-planner-65fa154cab60dbda8e48b265e97651bbb977b072

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 CHANGED
@@ -1,16 +1,29 @@
1
1
  # @graphql-tools/executor-http
2
2
 
3
- ## 3.0.6-hive-router-query-planner-47d9b70e8c1b31ec9769d305a5c17769d4983c5e
3
+ ## 3.0.6-hive-router-query-planner-65fa154cab60dbda8e48b265e97651bbb977b072
4
4
  ### Patch Changes
5
5
 
6
6
 
7
7
 
8
+ - [#1608](https://github.com/graphql-hive/gateway/pull/1608) [`9c789fb`](https://github.com/graphql-hive/gateway/commit/9c789fb11f6de80e781ff056cb5b98c548938bea) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
9
+
10
+ - Updated dependency [`@graphql-tools/utils@^10.10.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.1) (from `^10.9.1`, in `dependencies`)
11
+ - Updated dependency [`@whatwg-node/fetch@^0.10.12` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.12) (from `^0.10.11`, in `dependencies`)
12
+
13
+
8
14
  - [#1662](https://github.com/graphql-hive/gateway/pull/1662) [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff) Thanks [@ardatan](https://github.com/ardatan)! - dependencies updates:
9
15
 
10
16
  - Updated dependency [`@graphql-tools/utils@^10.10.1` ↗︎](https://www.npmjs.com/package/@graphql-tools/utils/v/10.10.1) (from `^10.10.0`, in `dependencies`)
11
17
  - Updated dependency [`@whatwg-node/fetch@^0.10.12` ↗︎](https://www.npmjs.com/package/@whatwg-node/fetch/v/0.10.12) (from `^0.10.11`, in `dependencies`)
12
- - Updated dependencies [[`41bf64f`](https://github.com/graphql-hive/gateway/commit/41bf64f6fd538372ce28d021d874670301f10761), [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff)]:
13
- - @graphql-tools/executor-common@1.0.4-hive-router-query-planner-47d9b70e8c1b31ec9769d305a5c17769d4983c5e
18
+
19
+
20
+ - [`c754a96`](https://github.com/graphql-hive/gateway/commit/c754a96d49ea69f54f57a8f1b01baf9d2fb947b6) Thanks [@ardatan](https://github.com/ardatan)! - Use more specific error codes;
21
+
22
+ `GATEWAY_TIMEOUT` -> Server could not get a response from upstream in time
23
+ `SUBREQUEST_HTTP_ERROR` -> An error occurred while making the HTTP request to the upstream
24
+ `RESPONSE_VALIDATION_FAILED` -> The response from upstream did not conform to the expected GraphQL response format
25
+ - Updated dependencies [[`9c789fb`](https://github.com/graphql-hive/gateway/commit/9c789fb11f6de80e781ff056cb5b98c548938bea), [`41bf64f`](https://github.com/graphql-hive/gateway/commit/41bf64f6fd538372ce28d021d874670301f10761), [`27789de`](https://github.com/graphql-hive/gateway/commit/27789de7967cb5299d471c00434591f309b978ff)]:
26
+ - @graphql-tools/executor-common@1.0.4-hive-router-query-planner-65fa154cab60dbda8e48b265e97651bbb977b072
14
27
 
15
28
  ## 3.0.5
16
29
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -649,6 +649,7 @@ function buildHTTPExecutor(options) {
649
649
  };
650
650
  }
651
651
  function handleError(e) {
652
+ upstreamErrorExtensions.code = "SUBREQUEST_HTTP_ERROR";
652
653
  if (e.name === "AggregateError") {
653
654
  return {
654
655
  errors: e.errors.map(
@@ -729,6 +730,7 @@ function buildHTTPExecutor(options) {
729
730
  upstreamErrorExtensions.response.body = parsedResult;
730
731
  if (parsedResult.data == null && (parsedResult.errors == null || parsedResult.errors.length === 0)) {
731
732
  const message = `Unexpected empty "data" and "errors" fields in result: ${result}`;
733
+ upstreamErrorExtensions.code = "RESPONSE_VALIDATION_FAILED";
732
734
  return {
733
735
  errors: [
734
736
  utils.createGraphQLError(message, {
@@ -751,6 +753,7 @@ function buildHTTPExecutor(options) {
751
753
  }
752
754
  return parsedResult;
753
755
  } catch (e) {
756
+ upstreamErrorExtensions.code = "RESPONSE_VALIDATION_FAILED";
754
757
  return {
755
758
  errors: [
756
759
  utils.createGraphQLError(
@@ -765,6 +768,7 @@ function buildHTTPExecutor(options) {
765
768
  }
766
769
  } else {
767
770
  const message = "No response returned";
771
+ upstreamErrorExtensions.code = "RESPONSE_VALIDATION_FAILED";
768
772
  return {
769
773
  errors: [
770
774
  utils.createGraphQLError(message, {
package/dist/index.js CHANGED
@@ -647,6 +647,7 @@ function buildHTTPExecutor(options) {
647
647
  };
648
648
  }
649
649
  function handleError(e) {
650
+ upstreamErrorExtensions.code = "SUBREQUEST_HTTP_ERROR";
650
651
  if (e.name === "AggregateError") {
651
652
  return {
652
653
  errors: e.errors.map(
@@ -727,6 +728,7 @@ function buildHTTPExecutor(options) {
727
728
  upstreamErrorExtensions.response.body = parsedResult;
728
729
  if (parsedResult.data == null && (parsedResult.errors == null || parsedResult.errors.length === 0)) {
729
730
  const message = `Unexpected empty "data" and "errors" fields in result: ${result}`;
731
+ upstreamErrorExtensions.code = "RESPONSE_VALIDATION_FAILED";
730
732
  return {
731
733
  errors: [
732
734
  createGraphQLError(message, {
@@ -749,6 +751,7 @@ function buildHTTPExecutor(options) {
749
751
  }
750
752
  return parsedResult;
751
753
  } catch (e) {
754
+ upstreamErrorExtensions.code = "RESPONSE_VALIDATION_FAILED";
752
755
  return {
753
756
  errors: [
754
757
  createGraphQLError(
@@ -763,6 +766,7 @@ function buildHTTPExecutor(options) {
763
766
  }
764
767
  } else {
765
768
  const message = "No response returned";
769
+ upstreamErrorExtensions.code = "RESPONSE_VALIDATION_FAILED";
766
770
  return {
767
771
  errors: [
768
772
  createGraphQLError(message, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/executor-http",
3
- "version": "3.0.6-hive-router-query-planner-47d9b70e8c1b31ec9769d305a5c17769d4983c5e",
3
+ "version": "3.0.6-hive-router-query-planner-65fa154cab60dbda8e48b265e97651bbb977b072",
4
4
  "type": "module",
5
5
  "description": "A set of utils for faster development of GraphQL tools",
6
6
  "repository": {
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@graphql-hive/signal": "^2.0.0",
43
- "@graphql-tools/executor-common": "1.0.4-hive-router-query-planner-47d9b70e8c1b31ec9769d305a5c17769d4983c5e",
43
+ "@graphql-tools/executor-common": "1.0.4-hive-router-query-planner-65fa154cab60dbda8e48b265e97651bbb977b072",
44
44
  "@graphql-tools/utils": "^10.10.1",
45
45
  "@repeaterjs/repeater": "^3.0.4",
46
46
  "@whatwg-node/disposablestack": "^0.0.6",