Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

prisma single data fetch

const findUser = await prisma.user.findFirst({
    where: {
      posts: {
        some: {
          likes: {
            gt: 100
          }
        }
      }
    },
    orderBy: {
      id: "desc"
    }
  })
}
Source by www.prisma.io #
 
PREVIOUS NEXT
Tagged: #prisma #single #data #fetch
ADD COMMENT
Topic
Name
7+6 =