I have a fundamental question about Lightning technical design.
Today viewing debug logs I noticed that if Lightning component make multiple calls to server-side (invoke multiple apex-controller methods) all these calls appear in the same debug log. Looks like multiple server requests from lightning component are considered as part of a single transaction.
For example: we have 2 @AuraEnabled methods saveAccount() and saveContact(). Each method performs 55 SOQL queries. On LeX component we have button that invokes saveAccount() first and then saveContact().
- Question 1: will we hit 101 SOQL query limit in this case?
- Question 2: will database changes made by saveAccount() rolled back if saveContact() throws an exception?
Link to documentation or detailed explanation of what happening behind the scenes would be much appreciated.