Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

What is HelixQL?

⚠️ Warning

HelixQL is deprecated in HelixDB v2. Queries are now written with the Rust DSL and dispatched as JSON — see the Querying guide. This section is kept as a reference for legacy HelixQL projects.

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

HelixQL is a strongly typed, compiled query language for HelixDB that combines the best features of Gremlin, Cypher, and Rust to provide type-safe graph and vector queries.

Why use HelixQL instead of other query languages?

HelixQL addresses key limitations found in existing graph query languages:

  • Type safety: Queries are validated at compile time, catching errors before runtime
  • Readability: Clean, concise syntax that remains readable even for complex queries
  • Performance: Compiled queries execute faster than dynamically parsed alternatives
  • Developer experience: IDE support with autocomplete and type checking

Unlike Gremlin’s verbose syntax or Cypher’s runtime parsing, HelixQL provides a modern, type-safe approach to graph querying.

How do I write a HelixQL query?

HelixQL queries follow a simple, declarative syntax:

QUERY QueryName(param1: Type, param2: Type) =>
    result <- traversal_expression
    RETURN result

Query components

  • QUERY: Keyword to start a query definition
  • QueryName: Identifier for the query
  • parameters: Input parameters in parentheses
  • Type: Type of the parameter (e.g. String, I32, F64, Boolean, [Type] or schema Node/Edge)
  • =>: Separates query header from body
  • <-: Assignment operator
  • RETURN: Specifies output values
  • //: Single line comments

Next Steps

- **[Deploy your first query](https://docs.helix-db.com/cli/getting-started)** — Learn how to deploy your first query in HelixQL.

- **[Schemas](schema/schema-definition.md)** — Learn about how to build your schema in HelixQL.

- **[Traversals](select/selectN.md)** — Learn about how to traverse the graph in HelixQL.

- **[Creating data](create/addN.md)** — Learn about how to create data in HelixQL.

- **[Vector operations](vectors/searching.md)** — Learn about how to perform vector operations in HelixQL.

- **[Keyword search](keyword_search.md)** — Learn about how to perform keyword search in HelixQL.

- **[Properties](properties/property-access.md)** — Learn about how to access properties in HelixQL.

- **[Conditionals](conditionals/conditions.md)** — Learn about how to use conditionals in HelixQL.

- **[Result operations](result_ops.md)** — Learn about how to perform result operations in HelixQL.

- **[Output values](output_values.md)** — Learn about how to output values in HelixQL.

- **[Types](types.md)** — Learn about the types of HelixQL.

- **[Errors](errors/E101.md)** — Troubleshoot errors in HelixQL.