DFS, BFS and triangle count DQL queries

Hi! I am researching Dgraph as part of my work on evaluating the performance of graph databases. In particular, I need to run the following queries:

  1. Traversing DFS and BFS with a selection of vertices at a given depth.
  2. Counting all triangles in the graph without taking into account orientation.

I have studied the DQL documentation, but have not found the means to fully execute these queries. Do I understand correctly that the closest thing to performing BFS is recursive queries, and it is impossible to perform DFS and triangle counting in Dgraph?

Hi @affeeal,

Dgraph only has a few native graph functions (Dijkstra’s, recursive). I faced a similar challenge a while back and ended up using Python’s networkx package to perform graph analysis on a Dgraph cluster; notebook here: vlg/notebook/graph-analysis-and-visualization/workshop.ipynb at matthewmcneely/jupyter-notebook · dgraph-io/vlg · GitHub

1 Like