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

E624

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

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

QUERY getConnections(id: ID) =>
    user <- N<User>(id)
    connections <- user->LinksTo
    RETURN connections
N::User {
    name: String,
}

V<128>::Document {
    title: String,
}

E::LinksTo {
    From: User,
    To: Document,
}

Solution

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

N::User {
    name: String,
}

N::Post {
    content: String,
}

E::Authored {
    From: User,
    To: Post,
}
QUERY getPosts(id: ID) =>
    user <- N<User>(id)
    posts <- user->Authored
    RETURN posts