Nestjs, Transactions, Dependency Injection, Repository Pattern, Repository Design Pattern.
but then we will have inconsistent data in our database because order object will be left in orders table without any items. Here’s how database will look like when one query succeeds and the other one fails: In such a case, there should be no order object whatsoever as the API call failed. So this