Sort entityQuery by date published I'm attempting to perform a query to retrieve only the three most recent nodes of a certain content type.

$query = \Drupal::entityQuery('node')
    -&gt;condition('type', 'blog_post')
    -&gt;sort('field');
$nids = $query-&gt;execute();


I understand that I can use sort to specify the field I want the results to be sorted by. But how would I sort by the dates the nodes were published?
$query = \Drupal::entityQuery('node')
                -&gt;condition('status', 1) 
                -&gt;sort('created' , 'DESC');