What type should i use inside Promise (instead of ?) ? I dont know exactly what will return, because of second argument - UserSelect.
async getOneUser(where: Prisma.UserWhereUniqueInput, userSelect?: Prisma.UserSelect):Promise<?> {
const user = await this.prisma.user.findUnique({ where, select: { ...userSelect } })
return user
}
I want to be able to select specific fields to pass in the select statement, instead of passing all of them by default.