Skip to main content

Edge Type Does Not Have a Vector Type as Its From Source

Erroneous Code Example

This error occurs when you try to use an edge in a context that requires the From type to be a vector type, but the edge’s From type is not a vector.
QUERY getRelated(id: ID) =>
    user <- N<User>(id)
    related <- user->>SimilarTo
    RETURN related

Solution

Set the From type of the edge to a vector type.
V<128>::Document {
    title: String,
}

E::SimilarTo {
    From: Document,
    To: Document,
}