UNPKG

@webundsoehne/nestjs-graphql-typeorm-dataloader

Version:

A library to utilize the graphql-dataloader with nestjs and typeorm.

10 lines (7 loc) 372 B
import { Connection } from 'typeorm'; import { RelationMetadata } from 'typeorm/metadata/RelationMetadata'; /** * A shared component for handling the end result of the query. */ declare function directLoader<V>(relation: RelationMetadata, connection: Connection, grouper: string | ((entity: V) => any)): (ids: readonly any[]) => Promise<V[]>; export { directLoader };