Is it possible to make all of these queries to the...
# prisma-client
c
Is it possible to make all of these queries to the prisma DB in a single call versus doing this. Essentially I’d like to retrieve the fully populated
context.prisma.droneBuild({id: buildId})
with all of it’s downstream parts in a single network request, rather than having to make 10 queries to retrieve that information.
Copy code
const flightController = await context.prisma.droneBuild({id: buildId}).flightController().flightController()
  const esc = await context.prisma.droneBuild({id: buildId}).esc().esc()
  const vtx = await context.prisma.droneBuild({id: buildId}).vtx().vtx()
  const receiver = await context.prisma.droneBuild({id: buildId}).receiver().receiver()
  const camera = await context.prisma.droneBuild({id: buildId}).camera().camera()
  const motor = await context.prisma.droneBuild({id: buildId}).motor().motor()
  const propeller = await context.prisma.droneBuild({id: buildId}).propeller().propeller()
  const frame = await context.prisma.droneBuild({id: buildId}).frame().frame()
  const antenna = await context.prisma.droneBuild({id: buildId}).antenna().antenna()
  const battery = await context.prisma.droneBuild({id: buildId}).battery().battery()