UNPKG

@mando75/typeorm-graphql-loader

Version:

A dataloader which intelligently selects/joins the fields/relations from your TypeORM entities needed to resolve a GraphQL query

9 lines (8 loc) 397 B
import { LoaderOptions } from "./types"; import { BaseEntity, Connection } from "typeorm"; import { GraphQLQueryBuilder } from "./GraphQLQueryBuilder"; export declare class GraphQLDatabaseLoader { private readonly _queryManager; constructor(connection: Connection, options?: LoaderOptions); loadEntity<T extends typeof BaseEntity>(entity: T, alias?: string): GraphQLQueryBuilder<T>; }