Skip to main content

Filtering with WHERE  

Filter elements based on specific conditions.
The condition in the WHERE step must evaluate to a boolean value. If the condition is not met, the element will be filtered out from the results.
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.

Comparison Operations

The following operations can be used to compare values. EQ and NEQ can be used to compare strings, booleans, and numbers. GT, GTE, LT, and LTE can only be used to compare numbers.

String, Boolean, and Number Operations

Number Operations

Example 1: Basic filtering with WHERE

Here’s how to run the query using the SDKs or curl
For multiple conditions, see Multiple Conditional Steps.

Example 2: String and equality filtering

Here’s how to run the query using the SDKs or curl

Filter by Relationships with EXISTS  

Returns true if a traversal has any results. Otherwise, it returns false.

Example 1: Using EXISTS for relationship filtering

Here’s how to run the query using the SDKs or curl