EntityQuery for taxonomy term of specific bundle I would like to build a query for all taxonomy terms of a specific bundle.

$terms = \Drupal::entityQuery('taxonomy_term')
  -&gt;condition('type','mail_template')
  -&gt;execute();


This returns an error 'type' not found.

How do I query taxonomy terms of a specific bundle (specific vocabulary)?
This works :

$terms = \Drupal::entityQuery('taxonomy_term')
  -&gt;condition('vid','mail_template')
  -&gt;execute();