Graph Traversal/Item Properties

Property Additions

By defining new properties, you can modify the object returned by the traversal.

::{
    field: <SchemaField>, 
    followerCount: <SchemaField/Traversal>
}

Example

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

Here we are adding a new property followerCount to the user object.

QUERY get_user_details() =>
    users <- N<User>::RANGE(0, 10)
    RETURN users::{
        userID: ID,
        followerCount: _::In<Follows>::COUNT
    }