I have a lightning web component that needs to call UI API. I can't use the LWC wired adapters because the 'getRecordUi' does not take the "childRelationships" parameters like the 'record-ui' endpoint does.
This childRelationships parameter allows me to get the top record as well as the childRecords from different relationships in a single call. For example get an account with related contacts and opportunities in the same call.
Unfortunately calling the Salesforce API directly is not permitted through LWC or Apex called by LWC (session id not valid). So, the alternative solutions are:
Connected App with User/Password auth
Dirty workaround to display the accepted session id from VF and then do a getContent() from apex.
As an ISV, if I select the first one I can't find a way to automatically deploy this connected app with my package (without configuration needed on the clients side). I really don't want these steps to be done manually especially when the only purpose of it is to call their internal Salesforce API. Is there an alternative solution ?
If I select the second one (which works fine), is the security review going to be approved ?
BTW questions asked on partners community but no luck for now.