The Lightning component cannot directly perform SOQL queries.
An Apex class annotated with@AuraEnabledprovides server-side logic that can execute the SOQL query and return the data to the Lightning component.
Apex AuraEnabled Methods
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit