@graphql-mesh/graphql 0.104.13-alpha-20250915122406-30dd59f89862ef8c754bc064f3939a680d664dfb → 0.104.13-alpha-20250915133304-421e4247898eb134e5738bfda76bf0c9aac85125

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
@@ -9,6 +9,7 @@ const string_interpolation_1 = require("@graphql-mesh/string-interpolation");
9
9
  const utils_1 = require("@graphql-mesh/utils");
10
10
  const url_loader_1 = require("@graphql-tools/url-loader");
11
11
  const utils_2 = require("@graphql-tools/utils");
12
+ const promise_helpers_1 = require("@whatwg-node/promise-helpers");
12
13
  const utils_js_1 = require("./utils.js");
13
14
  const getResolverData = (0, utils_2.memoize1)(function getResolverData(params) {
14
15
  return {
@@ -39,7 +40,13 @@ class GraphQLHandler {
39
40
  logger.debug(() => `Sending GraphQL Request: `, (0, graphql_1.print)(executionRequest.document));
40
41
  executionRequest.info = executionRequest.info || {};
41
42
  executionRequest.info.sourceName = sourceName;
42
- return executor(executionRequest);
43
+ return (0, promise_helpers_1.handleMaybePromise)(() => executor(executionRequest), (result) => {
44
+ logger.debug(() => [`Received GraphQL Response: `, JSON.stringify(result, null, 2)]);
45
+ return result;
46
+ }, err => {
47
+ logger.debug(`GraphQL Response Error: `, err);
48
+ throw err;
49
+ });
43
50
  };
44
51
  }
45
52
  async getExecutorForHTTPSourceConfig(httpSourceConfig) {
package/esm/index.js CHANGED
@@ -6,6 +6,7 @@ import { getInterpolatedHeadersFactory, getInterpolatedStringFactory, parseInter
6
6
  import { isUrl, loadFromModuleExportExpression, parseWithCache, readFile, readFileOrUrl, readUrl, } from '@graphql-mesh/utils';
7
7
  import { UrlLoader } from '@graphql-tools/url-loader';
8
8
  import { getDocumentNodeFromSchema, getOperationASTFromRequest, isAsyncIterable, isDocumentNode, memoize1, parseSelectionSet, } from '@graphql-tools/utils';
9
+ import { handleMaybePromise } from '@whatwg-node/promise-helpers';
9
10
  import { getSubschemaForFederationWithTypeDefs, SubgraphSDLQuery } from './utils.js';
10
11
  const getResolverData = memoize1(function getResolverData(params) {
11
12
  return {
@@ -36,7 +37,13 @@ export default class GraphQLHandler {
36
37
  logger.debug(() => `Sending GraphQL Request: `, print(executionRequest.document));
37
38
  executionRequest.info = executionRequest.info || {};
38
39
  executionRequest.info.sourceName = sourceName;
39
- return executor(executionRequest);
40
+ return handleMaybePromise(() => executor(executionRequest), (result) => {
41
+ logger.debug(() => [`Received GraphQL Response: `, JSON.stringify(result, null, 2)]);
42
+ return result;
43
+ }, err => {
44
+ logger.debug(`GraphQL Response Error: `, err);
45
+ throw err;
46
+ });
40
47
  };
41
48
  }
42
49
  async getExecutorForHTTPSourceConfig(httpSourceConfig) {
package/package.json CHANGED
@@ -1,21 +1,22 @@
1
1
  {
2
2
  "name": "@graphql-mesh/graphql",
3
- "version": "0.104.13-alpha-20250915122406-30dd59f89862ef8c754bc064f3939a680d664dfb",
3
+ "version": "0.104.13-alpha-20250915133304-421e4247898eb134e5738bfda76bf0c9aac85125",
4
4
  "sideEffects": false,
5
5
  "peerDependencies": {
6
6
  "graphql": "*"
7
7
  },
8
8
  "dependencies": {
9
9
  "@graphql-mesh/cross-helpers": "^0.4.10",
10
- "@graphql-mesh/store": "0.104.13-alpha-20250915122406-30dd59f89862ef8c754bc064f3939a680d664dfb",
11
- "@graphql-mesh/string-interpolation": "0.5.9-alpha-20250915122406-30dd59f89862ef8c754bc064f3939a680d664dfb",
12
- "@graphql-mesh/types": "0.104.13-alpha-20250915122406-30dd59f89862ef8c754bc064f3939a680d664dfb",
13
- "@graphql-mesh/utils": "0.104.13-alpha-20250915122406-30dd59f89862ef8c754bc064f3939a680d664dfb",
10
+ "@graphql-mesh/store": "0.104.13-alpha-20250915133304-421e4247898eb134e5738bfda76bf0c9aac85125",
11
+ "@graphql-mesh/string-interpolation": "0.5.9-alpha-20250915133304-421e4247898eb134e5738bfda76bf0c9aac85125",
12
+ "@graphql-mesh/types": "0.104.13-alpha-20250915133304-421e4247898eb134e5738bfda76bf0c9aac85125",
13
+ "@graphql-mesh/utils": "0.104.13-alpha-20250915133304-421e4247898eb134e5738bfda76bf0c9aac85125",
14
14
  "@graphql-tools/delegate": "^10.0.28",
15
15
  "@graphql-tools/federation": "^3.0.0",
16
16
  "@graphql-tools/merge": "^9.0.12",
17
17
  "@graphql-tools/url-loader": "^8.0.9",
18
18
  "@graphql-tools/utils": "^10.8.0",
19
+ "@whatwg-node/promise-helpers": "^1.3.2",
19
20
  "lodash.get": "^4.4.2",
20
21
  "tslib": "^2.4.0"
21
22
  },