Hi :)
The problem with Neo4j's way to handle this is, that they only support it in embedded mode.
We do not (and do not want to) offer an embedded mode for ArangoDB – the request should
be send via HTTP to the server. If you would use it in the way you proposed, we would basically
execute it in memory and loose the strength of the database this way.
So we would have to think up a way to have it produce a query in a DSL-style.
andreas.outgoing(:friends).depth(5)
would be possible. But we can't offer blocks, because translating them to a query is hard, slow
and has restrictions that are not clear to the user.
So I'm thinking about something like this:
user = User.where(name: "Patrick")
friends = user.neighbors_via label: ["likes"]
# friends is now a relation, will be executed if you call .each, .to_a....
friends_of_friends = friends.neighbors_via label: ["likes"]
# I now refined the relation
friends_of_friends.each { |ff| invite_to_birthday ff }
What do you think? :)