> ## Documentation Index
> Fetch the complete documentation index at: https://helix-claude-document-return-objects-rxi6v.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# E306

# Expression is Not a Boolean

## Erroneous Code Example

This error occurs when an expression is expected to result in a boolean value but produces a different type.

<CodeGroup>
  ```helixql queries.hx theme={null}
  QUERY getUsers() =>
      users <- N<User>::WHERE(|u| u.name)
      RETURN users
  ```

  ```helixql schema.hx theme={null}
  N::User {
      name: String,
      active: Bool,
  }
  ```
</CodeGroup>

## Solution

Ensure the expression evaluates to a boolean value.

<CodeGroup>
  ```helixql queries.hx theme={null}
  QUERY getUsers() =>
      users <- N<User>::WHERE(|u| u.active == true)
      RETURN users
  ```

  ```helixql schema.hx theme={null}
  N::User {
      name: String,
      active: Bool,
  }
  ```
</CodeGroup>
