I get this error:
The select statement for type UserAvgAggregateOutputType needs at least one truthy value.
@Field(() => UserAvgAggregateInput, {nullable:true}) _avg?: UserAvgAggregateInput;
Even if you don't specify _avg in a GraphQL query, Nest may serialize it as undefined by default, while Prisma expects a valid object - and fails if either of these fields is present but empty.
This suggests filtering the arguments in service. Perhaps you should add the following from class-validator to the arguments for groupBy or aggregate
@ValidateIf(o => o._avg !== undefined)