Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.helix-db.com/llms.txt

Use this file to discover all available pages before exploring further.

For the complete documentation index optimized for AI agents, see llms.txt.

Invalid Boolean Comparison

Erroneous Code Example

This error occurs when you try to apply a boolean comparison operation to a type that doesn’t support it. In this example, the && operator is used on a non-boolean type.
Query getUser(user1: ID, user2: ID) =>
    user1 <- N<User>(user1)
    user2 <- N<User>(user2)
    is_eq <- user1::EQ(user2)
    RETURN is_eq

Solution

Ensure boolean operations are used on values that result in primitive types like booleans, numbers, or strings.
Query getUser(user1: ID, user2: ID) =>
    user1_name <- N<User>(user1)::{name}
    user2_name <- N<User>(user2)::{name}
    is_eq <- user1_name::EQ(user2_name)
    RETURN is_eq