Closed angelacode closed 7 years ago
Hi, I am following up on the documentation, it's still not clear what I am getting back:
n1.outgoing # Get nodes related by outgoing relationships n1.incoming # Get nodes related by incoming relationships n1.both # Get nodes related by any relationships
The output should be nodes, but I get Neography:RelationshipTraversal.
You may want to just use Cypher queries instead of trying to use the traversal api.
@neo.execute_query("MATCH (n) RETURN n LIMIT 25")
What you are seeing is a traversal being built along the lines of https://github.com/maxdemarzi/neography/blob/afb3a4724e67d6665d79ca280bb709e69814e893/lib/neography/node_traverser.rb
Once you finish describing the traverser, you need to .each
to get the answers.
johnathan.all_simple_paths_to(mary).incoming(:friends).depth(4).nodes.each do |node|
puts node.map{|n| n.name }.join(' => friends => ')
end
grateful_nodes = node.outgoing(:gratefulFor)
`grateful_nodes.methods'The list includes things like: How do I find the usage or definitions I know some of these things seem similar to methods for an array.
But I am interested in filter and uniqueness, for example.