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: ID) =>
    updatedUsers <- N<Person>(userID)::UPDATE({name: "John", age: 25})
    RETURN updatedUsers
Note that you don’t need to specify all the properties you want to update, only the ones you want to change. For example, if you only want to update the name, you can do:
QUERY UpdateUser(userID: ID) =>
    updatedUsers <- N<Person>(userID)::UPDATE({name: "John"})
    RETURN updatedUsers
And if you only want to update the age, you can do:
QUERY UpdateUser(userID: ID) =>
    updatedUsers <- N<Person>(userID)::UPDATE({age: 25})
    RETURN updatedUsers

The following examples would not work as the types don’t match
QUERY UpdateUser(userID: ID) =>
    // No email field in Person node
    updatedUsers <- N<Person>(userID)::UPDATE({ email: "john@example.com" })

    // Age as string instead of U32
    updatedUsers <- N<Person>(userID)::UPDATE({ age: "Hello" })

    RETURN updatedUsers