@graphql-hive/plugin-aws-sigv4 2.0.18-rc-a0230d1b1d5b4b954f00836782d4a14ff3675fef → 2.0.18-rc-5e567e1852fc29c523c478f312042f726c1e9b90

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,10 +1,10 @@
1
1
  # @graphql-hive/plugin-aws-sigv4
2
2
 
3
- ## 2.0.18-rc-a0230d1b1d5b4b954f00836782d4a14ff3675fef
3
+ ## 2.0.18-rc-5e567e1852fc29c523c478f312042f726c1e9b90
4
4
  ### Patch Changes
5
5
 
6
6
  - Updated dependencies [[`bc6cddd`](https://github.com/graphql-hive/gateway/commit/bc6cddd1c53a012dd02a1d8a7217a28e65cc6ae9)]:
7
- - @graphql-mesh/fusion-runtime@1.6.0-rc-a0230d1b1d5b4b954f00836782d4a14ff3675fef
7
+ - @graphql-mesh/fusion-runtime@1.6.0-rc-5e567e1852fc29c523c478f312042f726c1e9b90
8
8
 
9
9
  ## 2.0.17
10
10
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -35,6 +35,7 @@ const possibleGraphQLErrorProperties = [
35
35
  'name',
36
36
  'stack',
37
37
  'extensions',
38
+ 'coordinate',
38
39
  ];
39
40
  function isGraphQLErrorLike(error) {
40
41
  return (error != null &&
@@ -47,10 +48,17 @@ function createGraphQLError(message, options) {
47
48
  isGraphQLErrorLike(options.originalError)) {
48
49
  options.originalError = createGraphQLError(options.originalError.message, options.originalError);
49
50
  }
50
- if (graphql.versionInfo.major >= 17) {
51
- return new graphql.GraphQLError(message, options);
51
+ // To avoid type error on graphql <16, we have to use an any type here
52
+ const Constructor = graphql.GraphQLError;
53
+ const error = graphql.versionInfo.major >= 16
54
+ ? new Constructor(message, options)
55
+ : new Constructor(message, options?.nodes, options?.source, options?.positions, options?.path, options?.originalError, options?.extensions);
56
+ if (options?.coordinate && error.coordinate == null) {
57
+ Object.defineProperties(error, {
58
+ coordinate: { value: options.coordinate, enumerable: true, configurable: true },
59
+ });
52
60
  }
53
- return new graphql.GraphQLError(message, options?.nodes, options?.source, options?.positions, options?.path, options?.originalError, options?.extensions);
61
+ return error;
54
62
  }
55
63
 
56
64
  var AWSSignV4Headers = /* @__PURE__ */ ((AWSSignV4Headers2) => {
package/dist/index.js CHANGED
@@ -29,6 +29,7 @@ const possibleGraphQLErrorProperties = [
29
29
  'name',
30
30
  'stack',
31
31
  'extensions',
32
+ 'coordinate',
32
33
  ];
33
34
  function isGraphQLErrorLike(error) {
34
35
  return (error != null &&
@@ -41,10 +42,17 @@ function createGraphQLError(message, options) {
41
42
  isGraphQLErrorLike(options.originalError)) {
42
43
  options.originalError = createGraphQLError(options.originalError.message, options.originalError);
43
44
  }
44
- if (versionInfo.major >= 17) {
45
- return new GraphQLError(message, options);
45
+ // To avoid type error on graphql <16, we have to use an any type here
46
+ const Constructor = GraphQLError;
47
+ const error = versionInfo.major >= 16
48
+ ? new Constructor(message, options)
49
+ : new Constructor(message, options?.nodes, options?.source, options?.positions, options?.path, options?.originalError, options?.extensions);
50
+ if (options?.coordinate && error.coordinate == null) {
51
+ Object.defineProperties(error, {
52
+ coordinate: { value: options.coordinate, enumerable: true, configurable: true },
53
+ });
46
54
  }
47
- return new GraphQLError(message, options?.nodes, options?.source, options?.positions, options?.path, options?.originalError, options?.extensions);
55
+ return error;
48
56
  }
49
57
 
50
58
  var AWSSignV4Headers = /* @__PURE__ */ ((AWSSignV4Headers2) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/plugin-aws-sigv4",
3
- "version": "2.0.18-rc-a0230d1b1d5b4b954f00836782d4a14ff3675fef",
3
+ "version": "2.0.18-rc-5e567e1852fc29c523c478f312042f726c1e9b90",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,18 +43,18 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@aws-sdk/client-sts": "^3.931.0",
46
- "@graphql-mesh/fusion-runtime": "1.6.0-rc-a0230d1b1d5b4b954f00836782d4a14ff3675fef",
46
+ "@graphql-mesh/fusion-runtime": "1.6.0-rc-5e567e1852fc29c523c478f312042f726c1e9b90",
47
47
  "@whatwg-node/promise-helpers": "^1.3.2",
48
48
  "aws4": "1.13.2",
49
49
  "tslib": "^2.8.1"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@apollo/subgraph": "^2.11.3",
53
- "@graphql-hive/gateway-runtime": "2.3.6-rc-a0230d1b1d5b4b954f00836782d4a14ff3675fef",
53
+ "@graphql-hive/gateway-runtime": "2.3.6-rc-5e567e1852fc29c523c478f312042f726c1e9b90",
54
54
  "@types/aws4": "^1.11.6",
55
55
  "graphql": "^16.12.0",
56
56
  "graphql-yoga": "^5.16.2",
57
- "pkgroll": "2.21.3"
57
+ "pkgroll": "2.21.4"
58
58
  },
59
59
  "sideEffects": false
60
60
  }