import * as TypeGraphQL from "type-graphql" ; import graphqlFields from "graphql-fields" ; import { GraphQLResolveInfo } from "graphql" ; import { AggregateDirectorArgs } from "./args/AggregateDirectorArgs" ; import { Director } from "../../../models/Director" ; import { AggregateDirector } from "../../outputs/AggregateDirector" ; import { transformFields , getPrismaFromContext , transformCountFieldIntoSelectRelationsCount } from "../../../helpers" ; @ TypeGraphQL . Resolver ( _of => Director ) export class AggregateDirectorResolver { @ TypeGraphQL . Query ( _returns => AggregateDirector , { nullable : false } ) async aggregateDirector ( @ TypeGraphQL . Ctx ( ) ctx , @ TypeGraphQL . Info ( ) info , @ TypeGraphQL . Args ( ) args ) { return getPrismaFromContext ( ctx ) . director . aggregate ( { ... args , ... transformFields ( graphqlFields ( info as any ) ) , } ) ; } }