Hi there, is there a type i can use for specifying...
# prisma-client
j
Hi there, is there a type i can use for specifying a method return type where I use a findUnique with dinamyc include options passed in. For Example let's imagine i want a function that always add comments when i try to find a post:
Copy code
function getPost(postId: string, includeDef: Prisma.PostInclude) Promise<Post> {
  const include = {
    ...includeDef,
    comments: true
  }
  return await this.prisma.post.findUnique({
    where: {id: postId},
    include
  })
}