Adrian
02/21/2022, 4:18 PMasync findUnique<T extends Prisma.UserArgs.include>(
where: Prisma.UserWhereUniqueInput,
include?: T
): Promise<Prisma.UserGetPayload<{ include: T }>> {
// TODO: Fetch user from Azure AD B2C
return this.prisma.user.findUnique({
where: where,
include: include ?? userWithRolesAndAvatarAndPosters.include,
// ...userWithRolesAndAvatarAndPosters,
})
}
Any idea of how to make the return type of my function dynamic based upon the include argument?