@cedarjs/graphql-server 0.6.1-next.0 → 0.7.0

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.
Files changed (148) hide show
  1. package/dist/cjs/cors.d.ts +10 -0
  2. package/dist/cjs/cors.d.ts.map +1 -0
  3. package/dist/cjs/cors.js +70 -0
  4. package/dist/cjs/createGraphQLYoga.d.ts +6 -0
  5. package/dist/cjs/createGraphQLYoga.d.ts.map +1 -0
  6. package/dist/cjs/createGraphQLYoga.js +178 -0
  7. package/dist/cjs/directives/makeDirectives.d.ts +8 -0
  8. package/dist/cjs/directives/makeDirectives.d.ts.map +1 -0
  9. package/dist/cjs/directives/makeDirectives.js +89 -0
  10. package/dist/cjs/errors.d.ts +28 -0
  11. package/dist/cjs/errors.d.ts.map +1 -0
  12. package/dist/cjs/errors.js +98 -0
  13. package/dist/cjs/functions/graphql.d.ts +15 -0
  14. package/dist/cjs/functions/graphql.d.ts.map +1 -0
  15. package/dist/cjs/functions/graphql.js +141 -0
  16. package/dist/cjs/functions/useRequireAuth.d.ts +12 -0
  17. package/dist/cjs/functions/useRequireAuth.d.ts.map +1 -0
  18. package/dist/cjs/functions/useRequireAuth.js +70 -0
  19. package/dist/cjs/global.api-auto-imports.d.ts +5 -0
  20. package/dist/cjs/global.api-auto-imports.d.ts.map +1 -0
  21. package/dist/cjs/global.api-auto-imports.js +1 -0
  22. package/dist/cjs/globalContext.d.ts +25 -0
  23. package/dist/cjs/globalContext.d.ts.map +1 -0
  24. package/dist/cjs/globalContext.js +55 -0
  25. package/dist/cjs/globalContextStore.d.ts +9 -0
  26. package/dist/cjs/globalContextStore.d.ts.map +1 -0
  27. package/dist/cjs/globalContextStore.js +35 -0
  28. package/dist/cjs/graphiql.d.ts +8 -0
  29. package/dist/cjs/graphiql.d.ts.map +1 -0
  30. package/dist/cjs/graphiql.js +45 -0
  31. package/dist/cjs/index.d.ts +14 -0
  32. package/dist/cjs/index.d.ts.map +1 -0
  33. package/dist/cjs/index.js +75 -0
  34. package/dist/cjs/introspection.d.ts +7 -0
  35. package/dist/cjs/introspection.d.ts.map +1 -0
  36. package/dist/cjs/introspection.js +36 -0
  37. package/dist/cjs/makeMergedSchema.d.ts +17 -0
  38. package/dist/cjs/makeMergedSchema.d.ts.map +1 -0
  39. package/dist/cjs/makeMergedSchema.js +283 -0
  40. package/dist/cjs/package.json +1 -0
  41. package/dist/cjs/plugins/index.d.ts +10 -0
  42. package/dist/cjs/plugins/index.d.ts.map +1 -0
  43. package/dist/cjs/plugins/index.js +52 -0
  44. package/dist/cjs/plugins/useArmor.d.ts +4 -0
  45. package/dist/cjs/plugins/useArmor.d.ts.map +1 -0
  46. package/dist/cjs/plugins/useArmor.js +69 -0
  47. package/dist/cjs/plugins/useRedwoodAuthContext.d.ts +9 -0
  48. package/dist/cjs/plugins/useRedwoodAuthContext.d.ts.map +1 -0
  49. package/dist/cjs/plugins/useRedwoodAuthContext.js +61 -0
  50. package/dist/cjs/plugins/useRedwoodDirective.d.ts +83 -0
  51. package/dist/cjs/plugins/useRedwoodDirective.d.ts.map +1 -0
  52. package/dist/cjs/plugins/useRedwoodDirective.js +166 -0
  53. package/dist/cjs/plugins/useRedwoodError.d.ts +20 -0
  54. package/dist/cjs/plugins/useRedwoodError.d.ts.map +1 -0
  55. package/dist/cjs/plugins/useRedwoodError.js +63 -0
  56. package/dist/cjs/plugins/useRedwoodGlobalContextSetter.d.ts +9 -0
  57. package/dist/cjs/plugins/useRedwoodGlobalContextSetter.d.ts.map +1 -0
  58. package/dist/cjs/plugins/useRedwoodGlobalContextSetter.js +35 -0
  59. package/dist/cjs/plugins/useRedwoodLogger.d.ts +115 -0
  60. package/dist/cjs/plugins/useRedwoodLogger.d.ts.map +1 -0
  61. package/dist/cjs/plugins/useRedwoodLogger.js +149 -0
  62. package/dist/cjs/plugins/useRedwoodOpenTelemetry.d.ts +22 -0
  63. package/dist/cjs/plugins/useRedwoodOpenTelemetry.d.ts.map +1 -0
  64. package/dist/cjs/plugins/useRedwoodOpenTelemetry.js +156 -0
  65. package/dist/cjs/plugins/useRedwoodPopulateContext.d.ts +9 -0
  66. package/dist/cjs/plugins/useRedwoodPopulateContext.d.ts.map +1 -0
  67. package/dist/cjs/plugins/useRedwoodPopulateContext.js +35 -0
  68. package/dist/cjs/plugins/useRedwoodTrustedDocuments.d.ts +23 -0
  69. package/dist/cjs/plugins/useRedwoodTrustedDocuments.d.ts.map +1 -0
  70. package/dist/cjs/plugins/useRedwoodTrustedDocuments.js +80 -0
  71. package/dist/cjs/rootSchema.d.ts +25 -0
  72. package/dist/cjs/rootSchema.d.ts.map +1 -0
  73. package/dist/cjs/rootSchema.js +97 -0
  74. package/dist/cjs/subscriptions/makeSubscriptions.d.ts +18 -0
  75. package/dist/cjs/subscriptions/makeSubscriptions.d.ts.map +1 -0
  76. package/dist/cjs/subscriptions/makeSubscriptions.js +40 -0
  77. package/dist/cjs/types.d.ts +215 -0
  78. package/dist/cjs/types.d.ts.map +1 -0
  79. package/dist/cjs/types.js +16 -0
  80. package/dist/cors.js +2 -26
  81. package/dist/createGraphQLYoga.d.ts +1 -1
  82. package/dist/createGraphQLYoga.d.ts.map +1 -1
  83. package/dist/createGraphQLYoga.js +45 -59
  84. package/dist/directives/makeDirectives.d.ts +1 -1
  85. package/dist/directives/makeDirectives.d.ts.map +1 -1
  86. package/dist/directives/makeDirectives.js +9 -36
  87. package/dist/errors.js +5 -36
  88. package/dist/functions/graphql.d.ts +1 -1
  89. package/dist/functions/graphql.d.ts.map +1 -1
  90. package/dist/functions/graphql.js +6 -30
  91. package/dist/functions/useRequireAuth.d.ts +1 -1
  92. package/dist/functions/useRequireAuth.d.ts.map +1 -1
  93. package/dist/functions/useRequireAuth.js +9 -33
  94. package/dist/global.api-auto-imports.js +0 -1
  95. package/dist/globalContext.js +6 -32
  96. package/dist/globalContextStore.d.ts +1 -1
  97. package/dist/globalContextStore.d.ts.map +1 -1
  98. package/dist/globalContextStore.js +4 -28
  99. package/dist/graphiql.d.ts +1 -1
  100. package/dist/graphiql.d.ts.map +1 -1
  101. package/dist/graphiql.js +2 -26
  102. package/dist/index.d.ts +12 -11
  103. package/dist/index.d.ts.map +1 -1
  104. package/dist/index.js +24 -82
  105. package/dist/introspection.d.ts +1 -1
  106. package/dist/introspection.d.ts.map +1 -1
  107. package/dist/introspection.js +2 -26
  108. package/dist/makeMergedSchema.d.ts +3 -3
  109. package/dist/makeMergedSchema.d.ts.map +1 -1
  110. package/dist/makeMergedSchema.js +19 -49
  111. package/dist/plugins/index.d.ts +9 -9
  112. package/dist/plugins/index.d.ts.map +1 -1
  113. package/dist/plugins/index.js +11 -43
  114. package/dist/plugins/useArmor.d.ts +2 -2
  115. package/dist/plugins/useArmor.d.ts.map +1 -1
  116. package/dist/plugins/useArmor.js +4 -28
  117. package/dist/plugins/useRedwoodAuthContext.d.ts +1 -1
  118. package/dist/plugins/useRedwoodAuthContext.d.ts.map +1 -1
  119. package/dist/plugins/useRedwoodAuthContext.js +4 -28
  120. package/dist/plugins/useRedwoodDirective.js +9 -37
  121. package/dist/plugins/useRedwoodError.d.ts +1 -1
  122. package/dist/plugins/useRedwoodError.d.ts.map +1 -1
  123. package/dist/plugins/useRedwoodError.js +10 -31
  124. package/dist/plugins/useRedwoodGlobalContextSetter.d.ts +1 -1
  125. package/dist/plugins/useRedwoodGlobalContextSetter.d.ts.map +1 -1
  126. package/dist/plugins/useRedwoodGlobalContextSetter.js +4 -28
  127. package/dist/plugins/useRedwoodLogger.d.ts +1 -1
  128. package/dist/plugins/useRedwoodLogger.d.ts.map +1 -1
  129. package/dist/plugins/useRedwoodLogger.js +10 -34
  130. package/dist/plugins/useRedwoodOpenTelemetry.d.ts +1 -1
  131. package/dist/plugins/useRedwoodOpenTelemetry.d.ts.map +1 -1
  132. package/dist/plugins/useRedwoodOpenTelemetry.js +11 -46
  133. package/dist/plugins/useRedwoodPopulateContext.d.ts +1 -1
  134. package/dist/plugins/useRedwoodPopulateContext.d.ts.map +1 -1
  135. package/dist/plugins/useRedwoodPopulateContext.js +2 -26
  136. package/dist/plugins/useRedwoodTrustedDocuments.d.ts +1 -1
  137. package/dist/plugins/useRedwoodTrustedDocuments.d.ts.map +1 -1
  138. package/dist/plugins/useRedwoodTrustedDocuments.js +4 -28
  139. package/dist/rootSchema.js +26 -54
  140. package/dist/subscriptions/makeSubscriptions.js +5 -29
  141. package/dist/types.d.ts +4 -4
  142. package/dist/types.d.ts.map +1 -1
  143. package/dist/types.js +0 -16
  144. package/package.json +27 -10
  145. package/dist/plugins/__fixtures__/common.d.ts +0 -9
  146. package/dist/plugins/__fixtures__/common.d.ts.map +0 -1
  147. package/dist/plugins/__fixtures__/envelop-testing.d.ts +0 -55
  148. package/dist/plugins/__fixtures__/envelop-testing.d.ts.map +0 -1
@@ -1,28 +1,5 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var graphql_exports = {};
20
- __export(graphql_exports, {
21
- createGraphQLHandler: () => createGraphQLHandler
22
- });
23
- module.exports = __toCommonJS(graphql_exports);
24
- var import_store = require("@cedarjs/context/dist/store");
25
- var import_createGraphQLYoga = require("../createGraphQLYoga");
1
+ import { getAsyncStoreInstance } from "@cedarjs/context/dist/store";
2
+ import { createGraphQLYoga } from "../createGraphQLYoga.js";
26
3
  const createGraphQLHandler = ({
27
4
  healthCheckId,
28
5
  loggerConfig,
@@ -46,7 +23,7 @@ const createGraphQLHandler = ({
46
23
  openTelemetryOptions,
47
24
  trustedDocuments
48
25
  }) => {
49
- const { yoga, logger } = (0, import_createGraphQLYoga.createGraphQLYoga)({
26
+ const { yoga, logger } = createGraphQLYoga({
50
27
  healthCheckId,
51
28
  loggerConfig,
52
29
  context,
@@ -132,10 +109,9 @@ const createGraphQLHandler = ({
132
109
  throw e;
133
110
  }
134
111
  };
135
- return (0, import_store.getAsyncStoreInstance)().run(/* @__PURE__ */ new Map(), execFn);
112
+ return getAsyncStoreInstance().run(/* @__PURE__ */ new Map(), execFn);
136
113
  };
137
114
  };
138
- // Annotate the CommonJS export names for ESM import in node:
139
- 0 && (module.exports = {
115
+ export {
140
116
  createGraphQLHandler
141
- });
117
+ };
@@ -1,6 +1,6 @@
1
1
  import type { APIGatewayEvent, Context as LambdaContext } from 'aws-lambda';
2
2
  import type { Decoder } from '@cedarjs/api';
3
- import type { GetCurrentUser } from '../types';
3
+ import type { GetCurrentUser } from '../types.js';
4
4
  interface Args {
5
5
  authDecoder?: Decoder | Decoder[];
6
6
  handlerFn: (event: APIGatewayEvent, context: LambdaContext, ...others: any) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"useRequireAuth.d.ts","sourceRoot":"","sources":["../../src/functions/useRequireAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAE3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAM3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,UAAU,IAAI;IACZ,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IACjC,SAAS,EAAE,CACT,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,aAAa,EACtB,GAAG,MAAM,EAAE,GAAG,KACX,GAAG,CAAA;IACR,cAAc,CAAC,EAAE,cAAc,CAAA;CAChC;AAGD,MAAM,MAAM,cAAc,GAAG,CAC3B,IAAI,EAAE,IAAI,KACP,CACH,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,aAAa,EACtB,GAAG,IAAI,EAAE,GAAG,KACT,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAE3C,eAAO,MAAM,cAAc,EAAE,cAmD5B,CAAA"}
1
+ {"version":3,"file":"useRequireAuth.d.ts","sourceRoot":"","sources":["../../src/functions/useRequireAuth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,YAAY,CAAA;AAE3E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAM3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEjD,UAAU,IAAI;IACZ,WAAW,CAAC,EAAE,OAAO,GAAG,OAAO,EAAE,CAAA;IACjC,SAAS,EAAE,CACT,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,aAAa,EACtB,GAAG,MAAM,EAAE,GAAG,KACX,GAAG,CAAA;IACR,cAAc,CAAC,EAAE,cAAc,CAAA;CAChC;AAGD,MAAM,MAAM,cAAc,GAAG,CAC3B,IAAI,EAAE,IAAI,KACP,CACH,KAAK,EAAE,eAAe,EACtB,OAAO,EAAE,aAAa,EACtB,GAAG,IAAI,EAAE,GAAG,KACT,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAA;AAE3C,eAAO,MAAM,cAAc,EAAE,cAmD5B,CAAA"}
@@ -1,29 +1,6 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var useRequireAuth_exports = {};
20
- __export(useRequireAuth_exports, {
21
- useRequireAuth: () => useRequireAuth
22
- });
23
- module.exports = __toCommonJS(useRequireAuth_exports);
24
- var import_api = require("@cedarjs/api");
25
- var import_context = require("@cedarjs/context");
26
- var import_store = require("@cedarjs/context/dist/store");
1
+ import { getAuthenticationContext } from "@cedarjs/api";
2
+ import { context as globalContext } from "@cedarjs/context";
3
+ import { getAsyncStoreInstance } from "@cedarjs/context/dist/store";
27
4
  const useRequireAuth = ({
28
5
  authDecoder,
29
6
  handlerFn,
@@ -32,7 +9,7 @@ const useRequireAuth = ({
32
9
  return async (event, context, ...rest) => {
33
10
  const authEnrichedFunction = async () => {
34
11
  try {
35
- const authContext = await (0, import_api.getAuthenticationContext)({
12
+ const authContext = await getAuthenticationContext({
36
13
  authDecoder,
37
14
  event,
38
15
  context
@@ -43,10 +20,10 @@ const useRequireAuth = ({
43
20
  authContext[1],
44
21
  authContext[2]
45
22
  ) : null;
46
- import_context.context.currentUser = currentUser;
23
+ globalContext.currentUser = currentUser;
47
24
  }
48
25
  } catch (e) {
49
- import_context.context.currentUser = null;
26
+ globalContext.currentUser = null;
50
27
  if (process.env.NODE_ENV === "development") {
51
28
  console.warn("This warning is only printed in development mode.");
52
29
  console.warn(
@@ -58,13 +35,12 @@ const useRequireAuth = ({
58
35
  }
59
36
  return await handlerFn(event, context, ...rest);
60
37
  };
61
- return (0, import_store.getAsyncStoreInstance)().run(
38
+ return getAsyncStoreInstance().run(
62
39
  /* @__PURE__ */ new Map(),
63
40
  authEnrichedFunction
64
41
  );
65
42
  };
66
43
  };
67
- // Annotate the CommonJS export names for ESM import in node:
68
- 0 && (module.exports = {
44
+ export {
69
45
  useRequireAuth
70
- });
46
+ };
@@ -1 +0,0 @@
1
- "use strict";
@@ -1,38 +1,13 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var globalContext_exports = {};
20
- __export(globalContext_exports, {
21
- context: () => context,
22
- createContextProxy: () => createContextProxy,
23
- setContext: () => setContext
24
- });
25
- module.exports = __toCommonJS(globalContext_exports);
26
- var import_globalContextStore = require("./globalContextStore");
1
+ import { getAsyncStoreInstance } from "./globalContextStore.js";
27
2
  const createContextProxy = (target) => {
28
3
  return new Proxy(target, {
29
4
  get: (_target, property) => {
30
- const store = (0, import_globalContextStore.getAsyncStoreInstance)().getStore();
5
+ const store = getAsyncStoreInstance().getStore();
31
6
  const ctx = store?.get("context") || {};
32
7
  return ctx[property];
33
8
  },
34
9
  set: (_target, property, newVal) => {
35
- const store = (0, import_globalContextStore.getAsyncStoreInstance)().getStore();
10
+ const store = getAsyncStoreInstance().getStore();
36
11
  const ctx = store?.get("context") || {};
37
12
  ctx[property] = newVal;
38
13
  store?.set("context", ctx);
@@ -43,13 +18,12 @@ const createContextProxy = (target) => {
43
18
  let context = createContextProxy({});
44
19
  const setContext = (newContext) => {
45
20
  context = createContextProxy(newContext);
46
- const store = (0, import_globalContextStore.getAsyncStoreInstance)().getStore();
21
+ const store = getAsyncStoreInstance().getStore();
47
22
  store?.set("context", newContext);
48
23
  return context;
49
24
  };
50
- // Annotate the CommonJS export names for ESM import in node:
51
- 0 && (module.exports = {
25
+ export {
52
26
  context,
53
27
  createContextProxy,
54
28
  setContext
55
- });
29
+ };
@@ -1,5 +1,5 @@
1
1
  import { AsyncLocalStorage } from 'async_hooks';
2
- import type { GlobalContext } from './globalContext';
2
+ import type { GlobalContext } from './globalContext.js';
3
3
  /**
4
4
  * This returns a AsyncLocalStorage instance, not the actual store
5
5
  *
@@ -1 +1 @@
1
- {"version":3,"file":"globalContextStore.d.ts","sourceRoot":"","sources":["../src/globalContextStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAIpD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,qDAKjC,CAAA"}
1
+ {"version":3,"file":"globalContextStore.d.ts","sourceRoot":"","sources":["../src/globalContextStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAA;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAIvD;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,qDAKjC,CAAA"}
@@ -1,35 +1,11 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var globalContextStore_exports = {};
20
- __export(globalContextStore_exports, {
21
- getAsyncStoreInstance: () => getAsyncStoreInstance
22
- });
23
- module.exports = __toCommonJS(globalContextStore_exports);
24
- var import_async_hooks = require("async_hooks");
1
+ import { AsyncLocalStorage } from "async_hooks";
25
2
  let CONTEXT_STORAGE;
26
3
  const getAsyncStoreInstance = () => {
27
4
  if (!CONTEXT_STORAGE) {
28
- CONTEXT_STORAGE = new import_async_hooks.AsyncLocalStorage();
5
+ CONTEXT_STORAGE = new AsyncLocalStorage();
29
6
  }
30
7
  return CONTEXT_STORAGE;
31
8
  };
32
- // Annotate the CommonJS export names for ESM import in node:
33
- 0 && (module.exports = {
9
+ export {
34
10
  getAsyncStoreInstance
35
- });
11
+ };
@@ -1,4 +1,4 @@
1
- import type { GraphiQLOptions } from './types';
1
+ import type { GraphiQLOptions } from './types.js';
2
2
  export declare const configureGraphiQLPlayground: ({ allowGraphiQL, generateGraphiQLHeader, }: GraphiQLOptions) => false | {
3
3
  title: string;
4
4
  headers: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"graphiql.d.ts","sourceRoot":"","sources":["../src/graphiql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAS9C,eAAO,MAAM,2BAA2B,+CAGrC,eAAe;;;;;CAcjB,CAAA"}
1
+ {"version":3,"file":"graphiql.d.ts","sourceRoot":"","sources":["../src/graphiql.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAA;AASjD,eAAO,MAAM,2BAA2B,+CAGrC,eAAe;;;;;CAcjB,CAAA"}
package/dist/graphiql.js CHANGED
@@ -1,26 +1,3 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var graphiql_exports = {};
20
- __export(graphiql_exports, {
21
- configureGraphiQLPlayground: () => configureGraphiQLPlayground
22
- });
23
- module.exports = __toCommonJS(graphiql_exports);
24
1
  const DEFAULT_QUERY = `query Redwood {
25
2
  redwood {
26
3
  version
@@ -39,7 +16,6 @@ const configureGraphiQLPlayground = ({
39
16
  headerEditorEnabled: true
40
17
  } : false;
41
18
  };
42
- // Annotate the CommonJS export names for ESM import in node:
43
- 0 && (module.exports = {
19
+ export {
44
20
  configureGraphiQLPlayground
45
- });
21
+ };
package/dist/index.d.ts CHANGED
@@ -1,13 +1,14 @@
1
- import './global.api-auto-imports';
2
- export * from './global.api-auto-imports';
3
- export * from './errors';
4
- export * from './functions/graphql';
5
- export * from './functions/useRequireAuth';
6
- export * from './makeMergedSchema';
7
- export * from './createGraphQLYoga';
8
- export * from './types';
9
- export { createValidatorDirective, createTransformerDirective, getDirectiveName, makeDirectivesForPlugin, } from './directives/makeDirectives';
10
- export { hasDirective, DirectiveParams, DirectiveType, RedwoodDirective, ValidatorDirective, ValidatorDirectiveFunc, TransformerDirective, TransformerDirectiveFunc, ValidateArgs, TransformArgs, useRedwoodDirective, } from './plugins/useRedwoodDirective';
11
- export * as rootSchema from './rootSchema';
1
+ import './global.api-auto-imports.js';
2
+ export * from './global.api-auto-imports.js';
3
+ export * from './errors.js';
4
+ export * from './functions/graphql.js';
5
+ export * from './functions/useRequireAuth.js';
6
+ export * from './makeMergedSchema.js';
7
+ export * from './createGraphQLYoga.js';
8
+ export * from './types.js';
9
+ export { createValidatorDirective, createTransformerDirective, getDirectiveName, makeDirectivesForPlugin, } from './directives/makeDirectives.js';
10
+ export { hasDirective, DirectiveType, useRedwoodDirective, } from './plugins/useRedwoodDirective.js';
11
+ export type { DirectiveParams, RedwoodDirective, ValidatorDirective, ValidatorDirectiveFunc, TransformerDirective, TransformerDirectiveFunc, ValidateArgs, TransformArgs, } from './plugins/useRedwoodDirective.js';
12
+ export * as rootSchema from './rootSchema.js';
12
13
  export { context, setContext } from '@cedarjs/context';
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAA;AAElC,cAAc,2BAA2B,CAAA;AAEzC,cAAc,UAAU,CAAA;AACxB,cAAc,qBAAqB,CAAA;AACnC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,SAAS,CAAA;AAEvB,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,+BAA+B,CAAA;AAEtC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAA;AAG1C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,8BAA8B,CAAA;AAErC,cAAc,8BAA8B,CAAA;AAE5C,cAAc,aAAa,CAAA;AAC3B,cAAc,wBAAwB,CAAA;AACtC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,uBAAuB,CAAA;AACrC,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAE1B,OAAO,EACL,wBAAwB,EACxB,0BAA0B,EAC1B,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,gCAAgC,CAAA;AAEvC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,kCAAkC,CAAA;AAEzC,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,wBAAwB,EACxB,YAAY,EACZ,aAAa,GACd,MAAM,kCAAkC,CAAA;AAEzC,OAAO,KAAK,UAAU,MAAM,iBAAiB,CAAA;AAG7C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA"}
package/dist/index.js CHANGED
@@ -1,77 +1,26 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
- var index_exports = {};
31
- __export(index_exports, {
32
- DirectiveParams: () => import_useRedwoodDirective.DirectiveParams,
33
- DirectiveType: () => import_useRedwoodDirective.DirectiveType,
34
- RedwoodDirective: () => import_useRedwoodDirective.RedwoodDirective,
35
- TransformArgs: () => import_useRedwoodDirective.TransformArgs,
36
- TransformerDirective: () => import_useRedwoodDirective.TransformerDirective,
37
- TransformerDirectiveFunc: () => import_useRedwoodDirective.TransformerDirectiveFunc,
38
- ValidateArgs: () => import_useRedwoodDirective.ValidateArgs,
39
- ValidatorDirective: () => import_useRedwoodDirective.ValidatorDirective,
40
- ValidatorDirectiveFunc: () => import_useRedwoodDirective.ValidatorDirectiveFunc,
41
- context: () => import_context.context,
42
- createTransformerDirective: () => import_makeDirectives.createTransformerDirective,
43
- createValidatorDirective: () => import_makeDirectives.createValidatorDirective,
44
- getDirectiveName: () => import_makeDirectives.getDirectiveName,
45
- hasDirective: () => import_useRedwoodDirective.hasDirective,
46
- makeDirectivesForPlugin: () => import_makeDirectives.makeDirectivesForPlugin,
47
- rootSchema: () => rootSchema,
48
- setContext: () => import_context.setContext,
49
- useRedwoodDirective: () => import_useRedwoodDirective.useRedwoodDirective
50
- });
51
- module.exports = __toCommonJS(index_exports);
52
- var import_global = require("./global.api-auto-imports");
53
- __reExport(index_exports, require("./global.api-auto-imports"), module.exports);
54
- __reExport(index_exports, require("./errors"), module.exports);
55
- __reExport(index_exports, require("./functions/graphql"), module.exports);
56
- __reExport(index_exports, require("./functions/useRequireAuth"), module.exports);
57
- __reExport(index_exports, require("./makeMergedSchema"), module.exports);
58
- __reExport(index_exports, require("./createGraphQLYoga"), module.exports);
59
- __reExport(index_exports, require("./types"), module.exports);
60
- var import_makeDirectives = require("./directives/makeDirectives");
61
- var import_useRedwoodDirective = require("./plugins/useRedwoodDirective");
62
- var rootSchema = __toESM(require("./rootSchema"));
63
- var import_context = require("@cedarjs/context");
64
- // Annotate the CommonJS export names for ESM import in node:
65
- 0 && (module.exports = {
66
- DirectiveParams,
1
+ import "./global.api-auto-imports.js";
2
+ export * from "./global.api-auto-imports.js";
3
+ export * from "./errors.js";
4
+ export * from "./functions/graphql.js";
5
+ export * from "./functions/useRequireAuth.js";
6
+ export * from "./makeMergedSchema.js";
7
+ export * from "./createGraphQLYoga.js";
8
+ export * from "./types.js";
9
+ import {
10
+ createValidatorDirective,
11
+ createTransformerDirective,
12
+ getDirectiveName,
13
+ makeDirectivesForPlugin
14
+ } from "./directives/makeDirectives.js";
15
+ import {
16
+ hasDirective,
17
+ DirectiveType,
18
+ useRedwoodDirective
19
+ } from "./plugins/useRedwoodDirective.js";
20
+ import * as rootSchema from "./rootSchema.js";
21
+ import { context, setContext } from "@cedarjs/context";
22
+ export {
67
23
  DirectiveType,
68
- RedwoodDirective,
69
- TransformArgs,
70
- TransformerDirective,
71
- TransformerDirectiveFunc,
72
- ValidateArgs,
73
- ValidatorDirective,
74
- ValidatorDirectiveFunc,
75
24
  context,
76
25
  createTransformerDirective,
77
26
  createValidatorDirective,
@@ -80,12 +29,5 @@ var import_context = require("@cedarjs/context");
80
29
  makeDirectivesForPlugin,
81
30
  rootSchema,
82
31
  setContext,
83
- useRedwoodDirective,
84
- ...require("./global.api-auto-imports"),
85
- ...require("./errors"),
86
- ...require("./functions/graphql"),
87
- ...require("./functions/useRequireAuth"),
88
- ...require("./makeMergedSchema"),
89
- ...require("./createGraphQLYoga"),
90
- ...require("./types")
91
- });
32
+ useRedwoodDirective
33
+ };
@@ -1,4 +1,4 @@
1
- import type { GraphQLYogaOptions } from './types';
1
+ import type { GraphQLYogaOptions } from './types.js';
2
2
  export declare const configureGraphQLIntrospection: ({ allowIntrospection, }: {
3
3
  allowIntrospection?: GraphQLYogaOptions["allowIntrospection"];
4
4
  }) => {
@@ -1 +1 @@
1
- {"version":3,"file":"introspection.d.ts","sourceRoot":"","sources":["../src/introspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAA;AAEjD,eAAO,MAAM,6BAA6B,4BAEvC;IACD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;CAC9D;;CASA,CAAA"}
1
+ {"version":3,"file":"introspection.d.ts","sourceRoot":"","sources":["../src/introspection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,eAAO,MAAM,6BAA6B,4BAEvC;IACD,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;CAC9D;;CASA,CAAA"}
@@ -1,26 +1,3 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var introspection_exports = {};
20
- __export(introspection_exports, {
21
- configureGraphQLIntrospection: () => configureGraphQLIntrospection
22
- });
23
- module.exports = __toCommonJS(introspection_exports);
24
1
  const configureGraphQLIntrospection = ({
25
2
  allowIntrospection
26
3
  }) => {
@@ -30,7 +7,6 @@ const configureGraphQLIntrospection = ({
30
7
  disableIntrospection
31
8
  };
32
9
  };
33
- // Annotate the CommonJS export names for ESM import in node:
34
- 0 && (module.exports = {
10
+ export {
35
11
  configureGraphQLIntrospection
36
- });
12
+ };
@@ -1,8 +1,8 @@
1
1
  import type { IExecutableSchemaDefinition } from '@graphql-tools/schema';
2
2
  import type { GraphQLSchema } from 'graphql';
3
- import type { RedwoodDirective } from './plugins/useRedwoodDirective';
4
- import type { RedwoodSubscription } from './subscriptions/makeSubscriptions';
5
- import type { ServicesGlobImports, SdlGlobImports, RedwoodScalarConfig } from './types';
3
+ import type { RedwoodDirective } from './plugins/useRedwoodDirective.js';
4
+ import type { RedwoodSubscription } from './subscriptions/makeSubscriptions.js';
5
+ import type { ServicesGlobImports, SdlGlobImports, RedwoodScalarConfig } from './types.js';
6
6
  export declare const makeMergedSchema: ({ sdls, services, schemaOptions, directives, subscriptions, includeScalars, }: {
7
7
  sdls: SdlGlobImports;
8
8
  services: ServicesGlobImports;
@@ -1 +1 @@
1
- {"version":3,"file":"makeMergedSchema.d.ts","sourceRoot":"","sources":["../src/makeMergedSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAUxE,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,SAAS,CAAA;AAGhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAA;AAC5E,OAAO,KAAK,EAEV,mBAAmB,EAEnB,cAAc,EACd,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAsUhB,eAAO,MAAM,gBAAgB,kFAO1B;IACD,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAC9B,aAAa,EAAE,mBAAmB,EAAE,CAAA;IACpC,cAAc,CAAC,EAAE,mBAAmB,CAAA;IAEpC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAA;CACrD,kBA+CA,CAAA"}
1
+ {"version":3,"file":"makeMergedSchema.d.ts","sourceRoot":"","sources":["../src/makeMergedSchema.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAA;AAUxE,OAAO,KAAK,EACV,aAAa,EAKd,MAAM,SAAS,CAAA;AAIhB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AAExE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAA;AAC/E,OAAO,KAAK,EAEV,mBAAmB,EAEnB,cAAc,EACd,mBAAmB,EACpB,MAAM,YAAY,CAAA;AAsUnB,eAAO,MAAM,gBAAgB,kFAO1B;IACD,IAAI,EAAE,cAAc,CAAA;IACpB,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,UAAU,EAAE,gBAAgB,EAAE,CAAA;IAC9B,aAAa,EAAE,mBAAmB,EAAE,CAAA;IACpC,cAAc,CAAC,EAAE,mBAAmB,CAAA;IAEpC;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAA;CACrD,kBA+CA,CAAA"}
@@ -1,41 +1,12 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var makeMergedSchema_exports = {};
30
- __export(makeMergedSchema_exports, {
31
- makeMergedSchema: () => makeMergedSchema
32
- });
33
- module.exports = __toCommonJS(makeMergedSchema_exports);
34
- var import_merge = require("@graphql-tools/merge");
35
- var import_schema = require("@graphql-tools/schema");
36
- var opentelemetry = __toESM(require("@opentelemetry/api"));
37
- var import_lodash = require("lodash");
38
- var rootGqlSchema = __toESM(require("./rootSchema"));
1
+ import { mergeTypeDefs } from "@graphql-tools/merge";
2
+ import {
3
+ addResolversToSchema,
4
+ makeExecutableSchema
5
+ } from "@graphql-tools/schema";
6
+ import * as opentelemetry from "@opentelemetry/api";
7
+ import lodash from "lodash";
8
+ const { merge, omitBy } = lodash;
9
+ import * as rootGqlSchema from "./rootSchema.js";
39
10
  const wrapWithOpenTelemetry = async (func, args, root, context, info, name) => {
40
11
  const tracer = opentelemetry.trace.getTracer("redwoodjs");
41
12
  const parentSpan = context !== null && context["OPEN_TELEMETRY_GRAPHQL"];
@@ -138,7 +109,7 @@ const mergeResolversWithServices = ({
138
109
  resolvers,
139
110
  services
140
111
  }) => {
141
- const mergedServices = (0, import_lodash.merge)(
112
+ const mergedServices = merge(
142
113
  {},
143
114
  ...Object.keys(services).map((name) => services[name])
144
115
  );
@@ -176,7 +147,7 @@ const mergeResolversWithServices = ({
176
147
  [type.name]: resolveUnionType(type.getTypes())
177
148
  };
178
149
  }, {});
179
- return (0, import_lodash.omitBy)(
150
+ return omitBy(
180
151
  {
181
152
  ...resolvers,
182
153
  ...mappedResolvers,
@@ -185,8 +156,8 @@ const mergeResolversWithServices = ({
185
156
  (v) => typeof v === "undefined"
186
157
  );
187
158
  };
188
- const mergeResolvers = (schemas) => (0, import_lodash.omitBy)(
189
- (0, import_lodash.merge)(
159
+ const mergeResolvers = (schemas) => omitBy(
160
+ merge(
190
161
  {},
191
162
  ...[
192
163
  rootGqlSchema.resolvers,
@@ -197,7 +168,7 @@ const mergeResolvers = (schemas) => (0, import_lodash.omitBy)(
197
168
  );
198
169
  const mergeTypes = (types, options) => {
199
170
  const schemaDefinition = options && typeof options.schemaDefinition === "boolean" ? options.schemaDefinition : true;
200
- return (0, import_merge.mergeTypeDefs)(types, {
171
+ return mergeTypeDefs(types, {
201
172
  useSchemaDefinition: schemaDefinition,
202
173
  forceSchemaDefinition: schemaDefinition,
203
174
  throwOnConflict: true,
@@ -220,7 +191,7 @@ const mergeResolversWithSubscriptions = ({
220
191
  ...subscription.resolvers
221
192
  };
222
193
  });
223
- return (0, import_schema.addResolversToSchema)({
194
+ return addResolversToSchema({
224
195
  schema,
225
196
  resolvers: subscriptionResolvers,
226
197
  resolverValidationOptions,
@@ -255,7 +226,7 @@ const makeMergedSchema = ({
255
226
  { all: true }
256
227
  );
257
228
  const { typeDefs: schemaOptionsTypeDefs = [], ...otherSchemaOptions } = schemaOptions;
258
- const schema = (0, import_schema.makeExecutableSchema)({
229
+ const schema = makeExecutableSchema({
259
230
  typeDefs: [typeDefs, schemaOptionsTypeDefs],
260
231
  ...otherSchemaOptions
261
232
  });
@@ -269,14 +240,13 @@ const makeMergedSchema = ({
269
240
  subscriptions
270
241
  });
271
242
  const { resolverValidationOptions, inheritResolversFromInterfaces } = schemaOptions || {};
272
- return (0, import_schema.addResolversToSchema)({
243
+ return addResolversToSchema({
273
244
  schema: schemaWithSubscriptions,
274
245
  resolvers,
275
246
  resolverValidationOptions,
276
247
  inheritResolversFromInterfaces
277
248
  });
278
249
  };
279
- // Annotate the CommonJS export names for ESM import in node:
280
- 0 && (module.exports = {
250
+ export {
281
251
  makeMergedSchema
282
- });
252
+ };