how to get a list of all the boolean fields of a node? I need to get a list of all the boolean fields of the node

My code

 $query = \Drupal::entityQuery('node')
   -&gt;condition('status', NODE_PUBLISHED)
   -&gt;condition('type', 'product')


Please help me
You can get a list of an entity's field definitions with EntityFieldManager::getFieldDefinitions(). You should then have a list of fields defined on that entity and should be able to determine which are the boolean fields.

You can access this via a service like:

$product_field_definitions = \Drupal::service('entity_field.manager')-&gt;getFieldDefinitions('node', 'product');