I wish there was concept like merge field in Lightning components where some functions were global and directly accessible but looks like only way to do this will be code with server side call.
Below is sample code
public with sharing class SimpleServerSideController {
//Use @AuraEnabled to enable client- and server-side access to the method
@AuraEnabled
public static String getUserName() {
return userinfo.getName();
}
}
Using the Lightning Data Service - Considerations page as reference, it appears that currently you are able to work with data across spanning relationships (lookup, master-detail) but not collections of records (subquery).
Lightning Data Service supports primitive DML operations—create, read,
update, and delete. It operates on one record at a time, which you
retrieve or modify using the record ID. Lightning Data Service
supports spanned fields with a maximum depth of five levels. Support
for working with collections of records or for querying for a record
by anything other than the record ID isn’t available. If you must
support higher-level operations or multiple operations in one
transaction, use standard @AuraEnabled Apex methods.
Best Answer
It is possible now.