@webundsoehne/nestjs-graphql-typeorm-dataloader
Version:
A library to utilize the graphql-dataloader with nestjs and typeorm.
14 lines (11 loc) • 487 B
TypeScript
import DataLoader from 'dataloader';
import { Connection } from 'typeorm';
import { RelationMetadata } from 'typeorm/metadata/RelationMetadata';
import { SelfKeyFunc } from '../interfaces/typeorm-loader-handler.interface.js';
/**
* A common loader for loading entities by their own key.
*/
declare class SelfKeyDataloader<V> extends DataLoader<any, V[]> {
constructor(relation: RelationMetadata, connection: Connection, selfKeyFunc: SelfKeyFunc);
}
export { SelfKeyDataloader };