E207 - Invalid Edge Type for Item

Erroneous Code Example

This error occurs when you try to use an edge type that exists in the schema but is not valid for the specific item type you’re working with. In this example, the Created edge exists. However, it goes from User to Post, not from Post to User. Therefore, it is not valid for an Out step from a Post node.
Query getUserFromPost(postId: ID) =>
    user <- N<Post>(postId)::Out<Created>

Solution

In this case, the solution would be to change the traversal to use the In step instead of the Out step.
Query getUserFromPost(postId: ID) =>
    user <- N<Post>(postId)::In<Created>