Guide
Parameters separate request-specific values from the operation tree. A typed request
carries parameters and parameter_types, naming the same parameters, so the runtime
validates every value before execution and reuses a stable query shape. The SDK helpers
on this page send typed requests.
Without parameter_types, each value takes its type from its JSON encoding: a whole
number that fits in an i64 is an i64, any other number an f64, and strings,
booleans, arrays, objects, and null keep their JSON type. Cypher and SQL requests work
this way. One request cannot mix typed and untyped parameters.
Define and bind parameters
$tenant_id and $limit; see
Cypher values and parameters.
The SQL statement binds the same values as :tenant_id and :limit; with ?
placeholders instead, parameters is a list bound in written order. See
SQL values and parameters.
Supported parameter families
booli64,f64, andf32stringdate_timebytes- generic property
value, which accepts any JSON value object, sent as"object": any object, its fields checked likevalue- an object with declared fields, sent as
{ "object": { "<field>": "<type>", ... } }; see Typed object fields - arrays of any family, sent as
{ "array": "<element type>" } nullor a value of any family, sent as{ "nullable": "<type>" }; see Nullable fields
UnsupportedBytesParameter error when it serializes the request, so bytes
parameters cannot currently be sent to POST /v2/query.
In Go, ParamDateTime and typed date_time parameters accept helix.DateTime, time.Time, an
RFC3339 string, or an int/int64 epoch-millisecond value. The SDK normalizes each value to UTC
RFC3339 with millisecond precision.
A date_time parameter (or an array of them) is sent as an RFC3339 string and becomes a datetime
on the server: UTC epoch milliseconds, with any offset applied and sub-millisecond digits dropped.
It is stored, compared, and indexed exactly like a datetime literal or now(), so
2026-06-01T09:00:00+09:00 and 2026-06-01T00:00:00Z are equal and range filters order by
instant. Responses render datetimes as YYYY-MM-DDTHH:MM:SS.sssZ, and
Cypher and SQL read and render them the same
way. Only a declared date_time turns a string into a datetime, including a date_time field of a
typed object such as a forEachParam row. An untyped parameter, a
value or string parameter, and the fields of a bare object keep RFC3339 text as a string.
Before this, date_time parameters were stored as their raw strings. A writer that opens such data
converts it once in the background: each property whose every value is a datetime or an RFC3339
string with at most millisecond precision becomes datetimes, and any other property is left as
stored and named in the server log. That conversion runs once: rows imported later through a bare
object keep their strings, so declare their date_time fields. While it runs, a property holds
both forms: a datetime filter skips the rows not converted yet, and a text filter skips the rows
already converted.
Typed object fields
An object parameter can declare its fields. Each field is checked and normalized to its own type, recursively, so adate_time field inside array(object{...}) rows, or inside a nested
object, binds as a datetime. This is how bulk imports with
forEachParam keep their
datetimes queryable by typed range filters and range indexes.
- A declaration names at least one field, each once;
{ "object": {} }and a repeated field name are rejected when the request is parsed. - A value must have the declared fields. A missing field that is not
nullable, or an undeclared one (such as a misspelled
createdAt), rejects the request, naming the object’s path, for examplerows[3]. To accept free-form fields, use a bareobject, or declare a field asvalue. - A wrong-typed field, including an invalid RFC3339 string in a
date_timefield, rejects the request with the field’s path, such asrows[3].createdAt. Nothing is written. nullsatisfies only avalueor nullable field, as for top-level parameters.- Parameters count toward the request’s 255-level JSON nesting limit as they are written:
the body and its
parametersorparameter_typesmap take 2 levels, each array, object ornullablevalue level 1, and each declared object level 2 ({ "object": { ... } }), so a declared object nests at most 126 levels. The Rust SDK counts the same levels when it builds a request, so a request it builds also parses.
#[query] functions declare this for you: a DateTime inside a ParamObject,
ParamValue or BTreeMap<String, DateTime> argument is declared date_time where it sits.
One array declares one element type that fits all its elements: a field that is null or
omitted in some rows is declared nullable (a datetime one { "nullable": "date_time" }), so
rows may differ by omitted keys and each is sent as given, and an empty array fits any
element type. Rows that no single type fits, such as a datetime in one row and text in
another under the same key, fail with ParameterTypeMismatch naming that field, for
example rows[2].at.
Nullable fields
{ "nullable": "<type>" } accepts null or a value of the inner type, normalized as that
type. Declare an optional datetime column, such as deletedAt, this way: rows where it is
set store a datetime, rows where it is null store null, and rows that omit it leave it
unset.
null, so a row stores exactly the fields it has. Every field that is not nullable
must be present. In TypeScript an undefined field counts as omitted, as JSON drops it; in
Go a nil pointer, map or slice is null, so a *time.Time column works as is.
Query names
query_name is optional diagnostic metadata. It does not create a stored endpoint.
Unnamed requests serialize it as null.
Next steps
Writing data
Pass runtime values into create, update, and delete operations.
Reading data
Apply parameters to indexed sources and filters.