@webundsoehne/nestjs-graphql-typeorm-dataloader
Version:
A library to utilize the graphql-dataloader with nestjs and typeorm.
14 lines (11 loc) • 460 B
TypeScript
import { Connection } from 'typeorm';
/**
* Options for the dataloader interceptor and the apollo server plugin.
* Typeorm connection must be passed in to use the typeorm data loader.
* Field middleware has no way of accessing nestjs dependency injection so
* the injection of the connection must be done manually.
*/
interface ApolloServerLoaderPluginOptions {
typeormGetConnection?: () => Connection;
}
export { ApolloServerLoaderPluginOptions };