How to programmatically get webform drafts for a specific user? How to fetch all the webform drafts saved based on user id?
I tried the below query and it gives me all submission id's but how do I get just the drafts
$query = \Drupal::entityQuery('webform_submission')
      -&gt;condition('uid', 123)
      -&gt;condition('webform_id','test_1');
You could try this:
$query = \Drupal::entityQuery('webform_submission')
  -&gt;condition('uid', 123)
  -&gt;condition('webform_id, 'test_1')
  -&gt;condition('in_draft', TRUE);

$entity_ids = $query-&gt;execute();

Or via the EntityTypeManager:
/** @var \Drupal\webform\WebformSubmissionInterface[] $submissions */
$submissions = \Drupal::entityTypeManager()
  -&gt;getStorage('webform_submission')
  -&gt;loadByProperties([
    'uuid' =&gt; 123,
    'webform_id' =&gt; 'test_1',
    'in_draft' =&gt; TRUE,
  ]);