[SalesForce] Maximum number of records retrieved by one SOQL query in a lightning Apex backend controller

What is the maximum number of records retrieved by one SOQL query in a lightning Apex backend controller?

According to this:

Total number of records retrieved by SOQL queries | 50,000

But for me it is not clear why querieS and not query is used there.

Does it mean that in total in one call to Apex backend controller from my lightning component I can retrieve 50,000? Or does it mean that in one query I can retrieve 50,000?

Best Answer

"Queries" is plural because it is a cumulative limit across all queries called in a single transaction, not a per-query limit. Lightning components also use a "boxcar" behavior, so if you enqueue multiple actions at once, the 50,000 row limit will be split across all enqueued actions. You can get 50,000 rows in one query, but then you won't have any more rows left if you need a second query.