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.
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 .
The Idea
HelixQL is strongly typed, so you can only traverse edges and access properties that exist in your schema. Select starting points with N or E, then apply traversal steps to walk the graph safely.
::Out Outgoing Nodes
Return the nodes reached via outgoing edges of a given type.
Example 1: Listing who a user follows
QUERY GetUserFollowing (user_id: ID) =>
following <- N<User>(user_id)::Out<Follows>
RETURN following
QUERY CreateUser (name: String, handle: String) =>
user <- AddN<User>({
name: name,
handle: handle,
})
RETURN user
QUERY FollowUser (follower_id: ID, followed_id: ID, since: Date) =>
follow_edge <- AddE<Follows>({
since: since
})::From(follower_id)::To(followed_id)
RETURN follow_edge
See all 17 lines
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
from datetime import datetime, timezone
client = Client( local = True , port = 6969 )
since_value = datetime.now(timezone.utc).isoformat()
alice = client.query( "CreateUser" , { "name" : "Alice" , "handle" : "alice" })
bob = client.query( "CreateUser" , { "name" : "Bob" , "handle" : "bobby" })
alice_id = alice[ 0 ][ "user" ][ "id" ]
bob_id = bob[ 0 ][ "user" ][ "id" ]
client.query( "FollowUser" , {
"follower_id" : alice_id,
"followed_id" : bob_id,
"since" : since_value,
})
result = client.query( "GetUserFollowing" , { "user_id" : alice_id})
print (result)
See all 20 lines
::In Incoming Nodes
Return the nodes that point to the current selection via incoming edges of the given type.
Example 1: Listing who follows a user
QUERY GetUserFollowers (user_id: ID) =>
followers <- N<User>(user_id)::In<Follows>
RETURN followers
QUERY CreateUser (name: String, handle: String) =>
user <- AddN<User>({
name: name,
handle: handle,
})
RETURN user
QUERY FollowUser (follower_id: ID, followed_id: ID, since: Date) =>
follow_edge <- AddE<Follows>({
since: since
})::From(follower_id)::To(followed_id)
RETURN follow_edge
See all 17 lines
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
from datetime import datetime, timezone
client = Client( local = True , port = 6969 )
since_value = datetime.now(timezone.utc).isoformat()
alice = client.query( "CreateUser" , { "name" : "Alice" , "handle" : "alice" })
bob = client.query( "CreateUser" , { "name" : "Bob" , "handle" : "bobby" })
alice_id = alice[ 0 ][ "user" ][ "id" ]
bob_id = bob[ 0 ][ "user" ][ "id" ]
client.query( "FollowUser" , {
"follower_id" : alice_id,
"followed_id" : bob_id,
"since" : since_value,
})
result = client.query( "GetUserFollowers" , { "user_id" : bob_id})
print (result)
See all 20 lines
::OutE Outgoing Edges
Return the outgoing edges themselves (including properties and endpoints) for the given edge type.
Example 1: Inspecting follow relationships
QUERY GetFollowingEdges (user_id: ID) =>
follow_edges <- N<User>(user_id)::OutE<Follows>
RETURN follow_edges
QUERY CreateUser (name: String, handle: String) =>
user <- AddN<User>({
name: name,
handle: handle,
})
RETURN user
QUERY FollowUser (follower_id: ID, followed_id: ID, since: Date) =>
follow_edge <- AddE<Follows>({
since: since
})::From(follower_id)::To(followed_id)
RETURN follow_edge
See all 17 lines
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
from datetime import datetime, timezone
client = Client( local = True , port = 6969 )
since_value = datetime.now(timezone.utc).isoformat()
alice = client.query( "CreateUser" , { "name" : "Alice" , "handle" : "alice" })
bob = client.query( "CreateUser" , { "name" : "Bob" , "handle" : "bobby" })
alice_id = alice[ 0 ][ "user" ][ "id" ]
bob_id = bob[ 0 ][ "user" ][ "id" ]
client.query( "FollowUser" , {
"follower_id" : alice_id,
"followed_id" : bob_id,
"since" : since_value,
})
edges = client.query( "GetFollowingEdges" , { "user_id" : alice_id})
print (edges)
See all 20 lines
::InE Incoming Edges
Return incoming edges (with properties and endpoints) for the given type.
Example 1: Inspecting who followed a user
QUERY GetFollowerEdges (user_id: ID) =>
follow_edges <- N<User>(user_id)::InE<Follows>
RETURN follow_edges
QUERY CreateUser (name: String, handle: String) =>
user <- AddN<User>({
name: name,
handle: handle,
})
RETURN user
QUERY FollowUser (follower_id: ID, followed_id: ID, since: Date) =>
follow_edge <- AddE<Follows>({
since: since
})::From(follower_id)::To(followed_id)
RETURN follow_edge
See all 17 lines
Python
Rust
Go
TypeScript
Curl
from helix.client import Client
from datetime import datetime, timezone
client = Client( local = True , port = 6969 )
since_value = datetime.now(timezone.utc).isoformat()
alice = client.query( "CreateUser" , { "name" : "Alice" , "handle" : "alice" })
bob = client.query( "CreateUser" , { "name" : "Bob" , "handle" : "bobby" })
alice_id = alice[ 0 ][ "user" ][ "id" ]
bob_id = bob[ 0 ][ "user" ][ "id" ]
client.query( "FollowUser" , {
"follower_id" : alice_id,
"followed_id" : bob_id,
"since" : since_value,
})
edges = client.query( "GetFollowerEdges" , { "user_id" : bob_id})
print (edges)
See all 20 lines