@graphql-hive/gateway-runtime 2.4.1-alpha-0d54b261c5f75966d1b61ca4268fd5efc67774ec → 2.4.1-rc-452244aa391f6f5f782b0aa4c48bd40336b32c96

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,20 +1,12 @@
1
1
  # @graphql-hive/gateway-runtime
2
2
 
3
- ## 2.4.1-alpha-0d54b261c5f75966d1b61ca4268fd5efc67774ec
3
+ ## 2.4.1-rc-452244aa391f6f5f782b0aa4c48bd40336b32c96
4
4
  ### Patch Changes
5
5
 
6
6
 
7
7
 
8
8
  - [#1777](https://github.com/graphql-hive/gateway/pull/1777) [`7e33249`](https://github.com/graphql-hive/gateway/commit/7e332496179d213cf10f055b282ce30ab68279d1) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Hive console client agent inherits the plugin's root logger
9
9
 
10
-
11
-
12
- - [#1781](https://github.com/graphql-hive/gateway/pull/1781) [`0d54b26`](https://github.com/graphql-hive/gateway/commit/0d54b261c5f75966d1b61ca4268fd5efc67774ec) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Debug is determined by Hive Logger and does not need to be set for Hive Console's plugin
13
-
14
-
15
-
16
- - [#1781](https://github.com/graphql-hive/gateway/pull/1781) [`cdab99d`](https://github.com/graphql-hive/gateway/commit/cdab99df5e533035e3b7f483a995af5e8bde8948) Thanks [@enisdenjo](https://github.com/enisdenjo)! - Do not print token info by default when using Hive Console
17
-
18
10
  - Updated dependencies []:
19
11
  - @graphql-mesh/fusion-runtime@1.6.2
20
12
  - @graphql-mesh/hmac-upstream-signature@2.0.8
package/dist/index.cjs CHANGED
@@ -58,9 +58,20 @@ function getEnvStr(key, opts = {}) {
58
58
  }
59
59
  return variable?.trim();
60
60
  }
61
+ function getEnvBool(key, opts = {}) {
62
+ return strToBool(getEnvStr(key, opts));
63
+ }
61
64
  function getNodeEnv(opts = {}) {
62
65
  return getEnvStr("NODE_ENV", opts);
63
66
  }
67
+ function strToBool(str) {
68
+ return ["1", "t", "true", "y", "yes", "on", "enabled"].includes(
69
+ (str || "").toLowerCase()
70
+ );
71
+ }
72
+ function isDebug() {
73
+ return getEnvBool("DEBUG");
74
+ }
64
75
 
65
76
  function checkIfDataSatisfiesSelectionSet(selectionSet, data) {
66
77
  if (Array.isArray(data)) {
@@ -564,8 +575,8 @@ function useHiveConsole({
564
575
  throw new Error("Hive plugin is enabled but the token is not provided");
565
576
  }
566
577
  return yoga.useHive({
578
+ debug: isDebug(),
567
579
  logger: options.log,
568
- printTokenInfo: false,
569
580
  ...options,
570
581
  enabled: !!enabled,
571
582
  token,
package/dist/index.js CHANGED
@@ -57,9 +57,20 @@ function getEnvStr(key, opts = {}) {
57
57
  }
58
58
  return variable?.trim();
59
59
  }
60
+ function getEnvBool(key, opts = {}) {
61
+ return strToBool(getEnvStr(key, opts));
62
+ }
60
63
  function getNodeEnv(opts = {}) {
61
64
  return getEnvStr("NODE_ENV", opts);
62
65
  }
66
+ function strToBool(str) {
67
+ return ["1", "t", "true", "y", "yes", "on", "enabled"].includes(
68
+ (str || "").toLowerCase()
69
+ );
70
+ }
71
+ function isDebug() {
72
+ return getEnvBool("DEBUG");
73
+ }
63
74
 
64
75
  function checkIfDataSatisfiesSelectionSet(selectionSet, data) {
65
76
  if (Array.isArray(data)) {
@@ -563,8 +574,8 @@ function useHiveConsole({
563
574
  throw new Error("Hive plugin is enabled but the token is not provided");
564
575
  }
565
576
  return useHive({
577
+ debug: isDebug(),
566
578
  logger: options.log,
567
- printTokenInfo: false,
568
579
  ...options,
569
580
  enabled: !!enabled,
570
581
  token,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-hive/gateway-runtime",
3
- "version": "2.4.1-alpha-0d54b261c5f75966d1b61ca4268fd5efc67774ec",
3
+ "version": "2.4.1-rc-452244aa391f6f5f782b0aa4c48bd40336b32c96",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",