graphql-modules 2.2.1 → 2.3.0-alpha-20231103075354-b583a894

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 (3) hide show
  1. package/index.js +5 -1
  2. package/index.mjs +5 -1
  3. package/package.json +1 -1
package/index.js CHANGED
@@ -1563,7 +1563,11 @@ function wrapResolver({ resolver, config, path, middlewareMap, isTypeResolver, i
1563
1563
  const wrappedResolver = (root, context, info) => {
1564
1564
  const ctx = {
1565
1565
  root,
1566
- context: context.ɵgetModuleContext(config.id, context),
1566
+ context: isReferenceResolver
1567
+ ? context.ɵgetModuleContext(config.id, context)
1568
+ : // We mark the context object as possibly undefined,
1569
+ // because graphql-jit for some reason doesn't pass it for isTypeOf or resolveType methods
1570
+ context === null || context === void 0 ? void 0 : context.ɵgetModuleContext(config.id, context),
1567
1571
  info,
1568
1572
  };
1569
1573
  return resolver(ctx.root, ctx.context, ctx.info);
package/index.mjs CHANGED
@@ -1560,7 +1560,11 @@ function wrapResolver({ resolver, config, path, middlewareMap, isTypeResolver, i
1560
1560
  const wrappedResolver = (root, context, info) => {
1561
1561
  const ctx = {
1562
1562
  root,
1563
- context: context.ɵgetModuleContext(config.id, context),
1563
+ context: isReferenceResolver
1564
+ ? context.ɵgetModuleContext(config.id, context)
1565
+ : // We mark the context object as possibly undefined,
1566
+ // because graphql-jit for some reason doesn't pass it for isTypeOf or resolveType methods
1567
+ context === null || context === void 0 ? void 0 : context.ɵgetModuleContext(config.id, context),
1564
1568
  info,
1565
1569
  };
1566
1570
  return resolver(ctx.root, ctx.context, ctx.info);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "graphql-modules",
3
- "version": "2.2.1",
3
+ "version": "2.3.0-alpha-20231103075354-b583a894",
4
4
  "description": "Create reusable, maintainable, testable and extendable GraphQL modules",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {