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