@gabroberge/nestjs-dataloader 1.3.0 → 1.3.1

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,5 +1,11 @@
1
1
  # @gabroberge/nestjs-dataloader
2
2
 
3
+ ## 1.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - dce19ad: fix issue with dataloader being generated twice
8
+
3
9
  ## 1.3.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.js CHANGED
@@ -100,10 +100,11 @@ var _NestDataLoaderInterceptor = class _NestDataLoaderInterceptor {
100
100
  return __async(this, null, function* () {
101
101
  var _a;
102
102
  if (injectionContext[type] === void 0) {
103
- const nestLoader = yield this.moduleRef.resolve(type, (_a = injectionContext[NEST_LOADER_CONTEXT_KEY]) == null ? void 0 : _a.contextId, {
103
+ yield this.moduleRef.resolve(type, (_a = injectionContext[NEST_LOADER_CONTEXT_KEY]) == null ? void 0 : _a.contextId, {
104
104
  strict: false
105
+ }).then((nestLoader) => {
106
+ injectionContext[type] = nestLoader.generateDataLoader();
105
107
  });
106
- injectionContext[type] = nestLoader.generateDataLoader();
107
108
  }
108
109
  return injectionContext[type];
109
110
  });
package/dist/index.mjs CHANGED
@@ -74,10 +74,11 @@ var _NestDataLoaderInterceptor = class _NestDataLoaderInterceptor {
74
74
  return __async(this, null, function* () {
75
75
  var _a;
76
76
  if (injectionContext[type] === void 0) {
77
- const nestLoader = yield this.moduleRef.resolve(type, (_a = injectionContext[NEST_LOADER_CONTEXT_KEY]) == null ? void 0 : _a.contextId, {
77
+ yield this.moduleRef.resolve(type, (_a = injectionContext[NEST_LOADER_CONTEXT_KEY]) == null ? void 0 : _a.contextId, {
78
78
  strict: false
79
+ }).then((nestLoader) => {
80
+ injectionContext[type] = nestLoader.generateDataLoader();
79
81
  });
80
- injectionContext[type] = nestLoader.generateDataLoader();
81
82
  }
82
83
  return injectionContext[type];
83
84
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gabroberge/nestjs-dataloader",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "A NestJS decorator for dataloader",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",