- Why Dgraph
expand(...predicates...) is used to query for all given predicates,
rather than listing them in the query. Querying
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.
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 your Types e.g
expand(Card, Document) as arguments to