Skip to main content
@tags: errors, error-codes, debugging, troubleshooting, validation, compile-errors, query, query-errors

E101: Unknown Node Type

Reference a node type that is not defined in schema.hx.

Example

  • Schema:
  • Query:

Solution

Define the node type User in schema.hx.
  • Schema:

E102: Unknown Edge Type

Reference an edge type that is not defined in schema.hx.

Example

  • Schema:
  • Query:

Solution

Define the edge type Posted in schema.hx.
  • Schema:

E103: Unknown Vector Type

Reference a vector type that is not defined in schema.hx.

Example

  • Schema:
  • Query:

Solution

Define the vector type Document in schema.hx.
  • Schema:

E105: Invalid Identifier

Use an invalid identifier in query.hx.

Example

Out is a reserved keyword so it cannot be used as a variable or a parameter name.
  • Query:

Solution

Rename the variable or parameter to a valid identifier.
  • Query:

E202: Field Not in Schema

Reference a field that is not defined in schema.hx for a given item type.

Example

The field username is not defined in schema.hx for the User item type.
  • Schema:
  • Query:

Solution

Define the field username in schema.hx for the User item type.
  • Schema:

E204: Reserved Field Name

Use a reserved field name in schema.hx or query.hx.

Example

The field id is a reserved field name for any item type.
  • Schema:

Solution

Rename the field to a valid identifier.
  • Schema:

E205: Type Mismatch

Occurs when the type of a value you’re providing doesn’t match the expected field type defined in schema.hx.

Example

  • Schema:
  • Query:

Solution

Change type of someField to String or U32.
  • Schema:
  • Query:

E207: Invalid Edge Type for Item

Use an edge type that exists in schema.hx but is not valid for the specific item type you’re working with.

Example

In this example, the Created edge exists. However, it goes from User to Post, not from Post to User. Therefore, it is not valid for an Out step from a Post node.
  • Schema:
  • Query:

Solution

Change the traversal to use the In step instead of the Out step.
  • Query:

E301: Variable Not in Scope

Reference a variable that is not currently in scope or has not been declared.

Example

The variable userId is not declared.
  • Query:

Solution

Declare the variable userId as a parameter before using it.
  • Query:

E302: Variable Previously Declared

Declare a variable that has already been declared in the current scope.

Example

In this example, the variable userId is declared twice.
  • Query:

Solution

Use a different variable name.
  • Query:

E304: Missing Item Type

An item type is required but not provided in your query.

Example

The User item type is required but not provided.
  • Query:

Solution

Specify the required item type within the < and > brackets after the traversal step in your query.
  • Query:

E305: Missing Parameter

A required parameter is missing from a function call or operation.

Example

The SearchV function is called without the k parameter which is required to limit the number of results.
  • Query:

Solution

Provide all required parameters for functions and operations.
  • Query:

E401: MCP Single Value Requirement

An MCP (Model Context Protocol) query returns multiple values when only a single value is expected.

Example

The MCP query returns multiple users, but MCP expects a single value.
  • Query:

Solution

Ensure MCP queries return exactly one value.
  • Query:

E501: Invalid Date

Provide a date value that cannot be parsed or is in an invalid format.

Example

The date value "2023-99-99" is invalid and cannot be parsed.
  • Schema:
  • Query:

Solution

Ensure the date value is in the correct format.
  • Query:

E601: Invalid Traversal

Attempt to perform a malformed traversal. Note: This error is not currently emitted by the compiler.

Example

  • Query:

Solution

  • Query:

E602: Invalid Step

Use a step that is not valid in the current context.

Example

The OutE<Knows> step results in edges, but the Out step can only be used on nodes.
  • Schema:
  • Query:

Solution

  • Query:

E604: Update Restriction

Performing an update operation on something other than nodes or edges.

Example

The update step is used on a vector type which is not allowed yet.
  • Query:

E611: Missing To ID

Create an edge without specifying the target node ID.

Example

The AddE step is used without specifying the To parameter.
  • Query:

Solution

Provide both From and To node IDs when creating edges.
  • Query:

E612: Missing From ID

Create an edge without specifying the source node ID.

Example

The AddE step is used without specifying the From parameter.
  • Query:

Solution

Provide both From and To node IDs when creating edges.
  • Query:

E621: Invalid Boolean Comparison

Apply a boolean comparison operation to a type that doesn’t support it.

Example

  • Schema:
  • Query:

Solution

Ensure boolean operations are used on values that result in primitive types like booleans, numbers, or strings.
  • Query:

E622: Type Mismatch in Comparison

Compare a property with a value of a different type.

Example

  • Schema:
  • Query:

Solution

  • Query:

E631: Incomplete Range

Define a range without both start and end values.

Example

  • Query:

Solution

  • Query:

E632: Invalid Range Order

The start value of a range is greater than or equal to the end value. This error is only emitted by the compiler when both start and end values are provided as literals. A runtime error will be emitted if the range is not valid at runtime.

Example

The start value is greater than the end value.
  • Query:

Solution

Ensure range start value is less than end value.
  • Query:

E633: Non-Integer Range Index

Use a non-integer value as an index in a range operation.

Example

The range index is a float value which is not allowed.
  • Query:

Solution

Use integer values for range indices or set variable types to integer types.
  • Query:

E641: Closure Position Restriction

Place a closure operation in a position other than the last step of a traversal.

Example

The closure is not at the end of the traversal.
  • Query:

Solution

Move the closure to the last step of the traversal.
  • Query:

E642: Object Position Restriction

Place an object operation in a position other than the last step of a traversal.

Example

The object is not at the end of the traversal.
  • Query:

Solution

Move the object to the last step of the traversal.
  • Query:

E643: Field Previously Excluded

Access or include a field that has been previously excluded in the traversal.

Example

The email field is excluded in the traversal, but is being included.
  • Query:

Solution

Remove the exclusion or access the field after the exclusion.
  • Query:

E644: Exclude Position Restriction

Place an exclude operation in a position other than the last step of a traversal or the step before an object remapping or closure remapping step.

Example

The exclude step is used before the Out<Knows> step which is not allowed.
  • Query:

Solution

Move the exclude step to the last step of the traversal or the step before an object remapping or closure remapping step.
  • Query:

E645

Define an object remapping with no fields.

Example

  • Schema:
  • Query:

Solution

  • Query:

E651: Non-Iterable Variable

Use a non-iterable variable in an iteration context.

Example

The parameter name is not iterable, so it cannot be used in an iteration context.
  • Query:

Solution

Ensure variables used in iterations are collections or arrays.
  • Query:

E652: Invalid Field Access

Access a field that doesn’t exist on the inner type of an iterable variable.

Example

The nonexistent_field field doesn’t exist on the inner type of the userData iterable variable.
  • Query:

Solution

Ensure to only access fields that exist on the inner type.
  • Query:

E653: Non-Object Inner Type

The inner type of an iterable variable is not an object type, preventing field access or object destructuring.

Example

The names variable contains strings, not objects, so field access is not allowed.
  • Query:

Solution

Ensure iterable contains object types for field access.
  • Query: