Loading
Current section: Updating Data 6 exercises
Problem

Optimizing Database Calls with Nested Queries in Prisma

Transcript

00:00 As cool as that transaction thing is, it actually would be even better to not make so many calls to the database and just let Prisma optimize the calls that are gonna be made. And so we're gonna use nested queries for our updates. It turns out you can actually take all four of the different things that we're doing with the database and put it all in a single query.

00:19 So that is your task. And we actually, Kelly already got rid of the transaction stuff. So you don't need to worry about getting rid of that. Just update all of those queries to be in a single one and we'll be off to the races with a really awesome update strategy for this particular interaction. Have a good time.