Join Slack
Communities
Powered by
Hi, does anyone know how to make 2 level nested qu...
# orm-help
l
Leonardo
03/06/2019, 8:06 PM
Hi, does anyone know how to make 2 level nested queries in prisma client?, I'm trying to make a query like: prisma.user({userId}).sentOpinions().toUser().userId But the only thing that works is: prisma.user({userId}).sentOpinions()
h
Harshit
03/07/2019, 4:18 PM
You will need to use the $fragment syntax here, see
https://www.prisma.io/docs/prisma-client/basic-data-access/reading-data-JAVASCRIPT-rsc2/#using-fragments-for-fine-grained-data-access
Open in Slack
Previous
Next