UPDATE

Update the properties of existing elements.

::UPDATE({<properties_list>})

Example:

In schema.hx:

N::Person {
    name: String,
    age: U32
}

In query.hx:

QUERY UpdateUser(userID: String) =>
    updatedUsers <- N<Person>(userID)::UPDATE({name: "John", age: 25})
    RETURN updatedUsers

Notes:

The following examples would not work as the types don’t match:

QUERY UpdateUser(userID: String) =>
    updatedUsers <- N<Person>::UPDATE({ email: "john@example.com" })
    updatedUsers <- N<Person>::UPDATE({ age: "Hello" })
    RETURN updatedUsers