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