Skip to content

Commit 531eab0

Browse files
committed
Data loader strategies do not need to be request scoped
Maybe at one point they did need the REQUEST/CONTEXT injected for session/identity. But now that's passed around as an async context.
1 parent ed83214 commit 531eab0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/data-loader/loader-factory.decorator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Injectable, Scope, type Type } from '@nestjs/common';
1+
import { Injectable, type Type } from '@nestjs/common';
22
import { createMetadataDecorator } from '@seedcompany/nest';
33
import type { ValueOf } from 'type-fest';
44
import type { Many } from '~/common';
@@ -42,7 +42,7 @@ export const LoaderFactory =
4242
options?: LoaderOptions,
4343
): (<LoaderCtor extends DataLoaderCtor>(target: LoaderCtor) => void) =>
4444
(target) => {
45-
Injectable({ scope: Scope.REQUEST })(target);
45+
Injectable()(target);
4646

4747
LoaderFactoryMetadata(resource, {
4848
...options,

0 commit comments

Comments
 (0)