@graphql-mesh/graphql 0.94.3 → 0.94.4-alpha-20230707084354-da97d469a

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/cjs/index.js CHANGED
@@ -43,7 +43,7 @@ class GraphQLHandler {
43
43
  };
44
44
  }
45
45
  async getExecutorForHTTPSourceConfig(httpSourceConfig) {
46
- const { endpoint, operationHeaders = {} } = httpSourceConfig;
46
+ const { endpoint, operationHeaders = {}, connectionParams = {} } = httpSourceConfig;
47
47
  this.interpolationStringSet.add(endpoint);
48
48
  Object.keys(operationHeaders).forEach(headerName => {
49
49
  this.interpolationStringSet.add(headerName.toString());
@@ -53,6 +53,7 @@ class GraphQLHandler {
53
53
  const subscriptionsEndpoint = httpSourceConfig.subscriptionsEndpoint
54
54
  ? string_interpolation_1.stringInterpolator.parse(httpSourceConfig.subscriptionsEndpoint, { env: cross_helpers_1.process.env })
55
55
  : undefined;
56
+ const connectionParamsFactory = (0, string_interpolation_1.getInterpolatedHeadersFactory)(connectionParams);
56
57
  const executor = this.urlLoader.getExecutorAsync(endpoint, {
57
58
  ...httpSourceConfig,
58
59
  subscriptionsEndpoint,
@@ -66,6 +67,7 @@ class GraphQLHandler {
66
67
  extensions: {
67
68
  ...params.extensions,
68
69
  headers: operationHeadersFactory(resolverData),
70
+ connectionParams: connectionParamsFactory(resolverData),
69
71
  endpoint: endpointFactory(resolverData),
70
72
  },
71
73
  });
package/esm/index.js CHANGED
@@ -40,7 +40,7 @@ export default class GraphQLHandler {
40
40
  };
41
41
  }
42
42
  async getExecutorForHTTPSourceConfig(httpSourceConfig) {
43
- const { endpoint, operationHeaders = {} } = httpSourceConfig;
43
+ const { endpoint, operationHeaders = {}, connectionParams = {} } = httpSourceConfig;
44
44
  this.interpolationStringSet.add(endpoint);
45
45
  Object.keys(operationHeaders).forEach(headerName => {
46
46
  this.interpolationStringSet.add(headerName.toString());
@@ -50,6 +50,7 @@ export default class GraphQLHandler {
50
50
  const subscriptionsEndpoint = httpSourceConfig.subscriptionsEndpoint
51
51
  ? stringInterpolator.parse(httpSourceConfig.subscriptionsEndpoint, { env: process.env })
52
52
  : undefined;
53
+ const connectionParamsFactory = getInterpolatedHeadersFactory(connectionParams);
53
54
  const executor = this.urlLoader.getExecutorAsync(endpoint, {
54
55
  ...httpSourceConfig,
55
56
  subscriptionsEndpoint,
@@ -63,6 +64,7 @@ export default class GraphQLHandler {
63
64
  extensions: {
64
65
  ...params.extensions,
65
66
  headers: operationHeadersFactory(resolverData),
67
+ connectionParams: connectionParamsFactory(resolverData),
66
68
  endpoint: endpointFactory(resolverData),
67
69
  },
68
70
  });
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@graphql-mesh/graphql",
3
- "version": "0.94.3",
3
+ "version": "0.94.4-alpha-20230707084354-da97d469a",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "@graphql-mesh/cross-helpers": "^0.4.0",
7
- "@graphql-mesh/store": "^0.94.2",
8
- "@graphql-mesh/types": "^0.94.2",
9
- "@graphql-mesh/utils": "^0.94.2",
7
+ "@graphql-mesh/store": "0.94.3-alpha-20230707084354-da97d469a",
8
+ "@graphql-mesh/types": "0.94.3-alpha-20230707084354-da97d469a",
9
+ "@graphql-mesh/utils": "0.94.3-alpha-20230707084354-da97d469a",
10
10
  "@graphql-tools/utils": "^9.2.1 || ^10.0.0",
11
11
  "graphql": "*",
12
12
  "tslib": "^2.4.0"
13
13
  },
14
14
  "dependencies": {
15
- "@graphql-mesh/string-interpolation": "^0.5.0",
15
+ "@graphql-mesh/string-interpolation": "0.5.1-alpha-20230707084354-da97d469a",
16
16
  "@graphql-tools/delegate": "^10.0.0",
17
17
  "@graphql-tools/url-loader": "^8.0.0",
18
18
  "@graphql-tools/wrap": "^10.0.0",