Skip to content

Commit d01f54b

Browse files
DilukaCopilot
andauthored
Update packages/query-graphql/src/loader/reference.loader.ts
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 695a430 commit d01f54b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/query-graphql/src/loader/reference.loader.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ export class ReferenceLoader<DTO> implements NestjsQueryDataloader<DTO, Referenc
1515
const ids = args.map((arg) => arg.id)
1616

1717
// Use batch query to fetch all entities at once
18-
const entities = await service.query({
19-
filter: { id: { in: ids } } as unknown as Filter<DTO>
20-
})
18+
const filter: Filter<DTO> = { id: { in: ids } };
19+
const entities = await service.query({ filter });
2120

2221
// Create a map for fast lookup by ID
2322
const entityMap = new Map<string | number, DTO>()

0 commit comments

Comments
 (0)