Skip to main content

Invalid Primitive Value

Erroneous Code Example

This error occurs when you provide a primitive value that is not valid for the expected type.
QUERY createUser() =>
    user <- N<User>::INSERT { age: "not a number" }
    RETURN user

Solution

Provide a valid primitive value that matches the expected type.
QUERY createUser() =>
    user <- N<User>::INSERT { age: 25 }
    RETURN user