Skip to main content

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

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,
}