Skip to main content
Tutorial
You will start a local HelixDB server, create two User nodes connected by a FOLLOWS edge, and read them back with one of the forthcoming v3 SDKs.

Prerequisites

  • Docker or Podman
  • Rust, Node.js 20+, Go, Python 3.11+, or the helix CLI for raw JSON
1

Install the CLI

2

Setup a local project

This creates the project structure, example query files, and installs dependencies.
you can choose a language to use with the --lang flag. The default is TypeScript.
3

Start the local database

This starts the local database at http://localhost:6969/.
4

Create and query the graph

In the generated after running helix init local, you will find a file called queries.rs (the file suffix will be different depending on the language you chose). For the language you chose, paste the following code into the file:
5

Run the query

you need to run this in the directory created by helix init local.
Each SDK decodes the same JSON response. Your terminal’s object formatting differs by language, but the response body is:
6

Open the dashboard

This opens the dashboard at http://localhost:3000/. You can explore the graph and query it with the UI.

What just happened

  • writeBatch() made invalid read-only mutation states unrepresentable.
  • Each varAs added one named query entry.
  • NodeRef.var("alice") referred to the result of the first entry.
  • Each chained operation wrapped the preceding operation as input.
  • returning(...) selected the named values in the response.
  • The follow entry still ran even though it was not returned.
The query walkthrough takes this same query apart operation by operation and explains the request and response JSON.

Clean up

Next steps

Data model

Learn how nodes, edges, labels, and properties fit together.

Writing data

Add, update, and remove graph data.

Reading data

Select data by ID, label, or indexed property.

Use another SDK

Switch to Rust, Go, or Python with the same query model.