import * as TypeGraphQL from "type-graphql" ; import graphqlFields from "graphql-fields" ; import { GraphQLResolveInfo } from "graphql" ; import { CreateManyMainUserArgs } from "./args/CreateManyMainUserArgs" ; import { MainUser } from "../../../models/MainUser" ; import { AffectedRowsOutput } from "../../outputs/AffectedRowsOutput" ; import { transformFields , getPrismaFromContext , transformCountFieldIntoSelectRelationsCount } from "../../../helpers" ; @ TypeGraphQL . Resolver ( _of => MainUser ) export class CreateManyMainUserResolver { @ TypeGraphQL . Mutation ( _returns => AffectedRowsOutput , { nullable : false } ) async createManyMainUser ( @ TypeGraphQL . Ctx ( ) ctx , @ TypeGraphQL . Info ( ) info , @ TypeGraphQL . Args ( ) args ) { const { _count } = transformFields ( graphqlFields ( info as any ) ) ; return getPrismaFromContext ( ctx ) . user . createMany ( { ... args , ... ( _count && transformCountFieldIntoSelectRelationsCount ( _count ) ) , } ) ; } }