Skip to main content

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

Erroneous Code Example

This error occurs when you try to use an edge in a context that requires the To type to be a vector type, but the edge’s To type is not a vector.
QUERY getRelated(id: ID) =>
    doc <- V<Document>(id)
    related <- doc->>References
    RETURN related

Solution

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

V<128>::Citation {
    source: String,
}

E::References {
    From: Document,
    To: Citation,
}