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