Here is the answer I got from Google Groups;
START me = node(1) MATCH me-[:KNOWS*0..1]-()-[:UPDATES_STATUS]->statusUpdate RETURN DISTINCT statusUpdate
Only thing I had to do was adding *0..1
depth indicator to the relation in order to get both 0 or 1 level depth results.
Edit: I had to add DISTINCT
because without it query includes 0 level nodes 2 times which results in duplicates.
Alternative query which returns same results using WITH
statement;
START me = node(1)
MATCH me-[:KNOWS*0..1]-friend
WITH DISTINCT friend
MATCH friend-[:UPDATES_STATUS]->statusUpdate
RETURN DISTINCT statusUpdate