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

# E622

# Type Mismatch in Comparison

## Erroneous Code Example

This error occurs when you compare a property with a value of a different type.

In this example, the `age` property is an integer, but the comparison is done with a string value.

<CodeGroup>
  ```rust queries.hx theme={null}
  Query getUser(user: ID) =>
      user <- N<User>(user)
      is_eq <- user::{name}::EQ(25)
      RETURN is_eq
  ```

  ```rust schema.hx theme={null}
  N::User {
      name: String,
      age: I64,
  }
  ```
</CodeGroup>

## Solution

Ensure compared values match the property type.

<CodeGroup>
  ```rust queries.hx theme={null}
  Query getUser(user: ID) =>
      user <- N<User>(user)
      is_eq <- user::{age}::EQ(25)
      RETURN is_eq
  ```
</CodeGroup>
