Andrew Bracker
Andrew Bracker

Reputation: 55

What is the graql query for getting everything in the graph

I have a small graph with just a couple of vertices. How can I print out all the vertices in the graph using graql?

Upvotes: 2

Views: 286

Answers (2)

Jason Liu
Jason Liu

Reputation: 21

match $a isa $b

This gives you everything in the graph, because everything has a type.

Upvotes: 2

Felix Chapman
Felix Chapman

Reputation: 91

I assume you mean all the instances. In that case, the easiest way is:

match $x isa $type; $type isa concept-type; select $x

If you only want entities, you can change concept-type to entity-type above.

Upvotes: 2

Related Questions