Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

E623

For the complete documentation index optimized for AI agents, see llms.txt.

Edge Type Does Not Have a Node 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 node, but the edge’s From type is not a node.

QUERY getConnections(id: ID) =>
    doc <- V<Document>(id)
    connections <- doc->Related
    RETURN connections
V<128>::Document {
    title: String,
}

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

Solution

Ensure the edge type has a node type as its From source, or use the appropriate traversal for vector types.

N::User {
    name: String,
}

E::Follows {
    From: User,
    To: User,
}
QUERY getFollowing(id: ID) =>
    user <- N<User>(id)
    following <- user->Follows
    RETURN following