Skip to main content

Count elements with COUNT  

Count the number of elements in a traversal.
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.

Example 1: Basic element counting

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

Scope results with RANGE  

Get a specific range of elements from a traversal.
RANGE is inclusive of the start but exclusive of the end. For example, RANGE(0, 10) returns elements 0 through 9 (10 total elements). Both start and end and required and must be positive integers.
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.

Example 1: Basic pagination

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

Sort results with ORDER  

Sort the results of a traversal by a property in ascending or descending order.
Use Asc for ascending order and Desc for descending order.
When using the SDKs or curling the endpoint, the query name must match what is defined in the queries.hx file exactly.

Example 1: Sorting by age (oldest first)

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

Example 2: Sorting by age (youngest first)

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