Dgraph DQL Tour

Basic

Graphs as results

The last query got us some data, but the result wasn’t very interesting, nor was it much to do with graphs.

In Dgraph and DQL, queries return graphs, not tables or lists of data.

A query is executed against a graph and the result is a subset of the queried graph, or some manipulation or calculation based on the queried graph.

Let’s improve the query to get Michael and his network of friends.

Something to try : Michael also owns a pet, find it and its name. The owns_pet edge will help here.

2.2 Graphs as results