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

Schema definition

⚠️ 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.

How do I define schemas in HelixDB?

Define the structure of your graph using HelixQL schema definitions. Every node, edge, and vector automatically includes an implicit ID field.

Node schemas

Define node types and their properties:

N::NodeType {
  field1: String,
  field2: U32
}

Edge schemas

Define relationships between nodes with properties:

E::EdgeType {
  From: NodeType,
  To: NodeType,
  Properties: {
    field1: String,
    field2: U32
  }
}

Vector schemas

Define vector types with metadata properties:

V::VectorType {
  field1: String
}