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