1
votes

I want to get all vertices from graph,as shown below

a -> b -> c -> d -> e -> f -> ...
     b2 -> c2 -> cd -> ....

I want to get all vertices, and use syntax like:

[WITH vertexCollection1[, vertexCollection2[, ...vertexCollectionN]]]
FOR vertex[, edge[, path]]
  IN [min[..max]]
  OUTBOUND|INBOUND|ANY startVertex
  GRAPH graphName
  [PRUNE pruneCondition]
  [OPTIONS options]

as you can see, I have to define the value of max first( IN [min[..max]] ), how can I get all vertices without providing a value for max when the depth is unknown?

1

1 Answers

0
votes

This isn't possible, a max value must either be provided, or it will default to the min value (which in turn defaults to 1).

There's nothing to stop you from setting this to an arbitrarily large number though (e.g. FOR v IN 1..99999999) - you'll get all vertices as long as max exceeds your max depth.