Expand Predicate

expand(...predicates...) is used to query for all given predicates, rather than listing them in the query. Querying

expand(_all_)

queries returns all edges out of every node matched at that level in the query. Expand can be nested to then expand all predicates at the next level.

We’ll see later how to use expand with variables to query for a particular set of edges.

Note

As of version v1.1 you will need to add Types in your schema for expand(_all_) to work. See more in Type System.

You can also use _reverse_ and _forward_ as arguments to expand().

Endpoint: /query Dgraph:  http://localhost:8080  
Response