# Graph Algorithms Implementations in DGraph

**URL:** <https://discuss.dgraph.io/t/graph-algorithms-implementations-in-dgraph/5153>\
**Category:** Dgraph\
**Created:** [September 27, 2019, 2:13pm UTC](https://discuss.dgraph.io/t/graph-algorithms-implementations-in-dgraph/5153 "2019-09-27T14:13:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shoukat](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@shoukat](https://discuss.dgraph.io/u/shoukat)\
**Post date:** [September 27, 2019, 2:13pm UTC](https://discuss.dgraph.io/t/graph-algorithms-implementations-in-dgraph/5153/1 "2019-09-27T14:13:17Z")

</div>

Hi, Does dgraph has templates or libraries to support graph Algorithms like Shortest Paths , Pageranks etc.

---

<div class="post-metadata">

**Author:** ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Post date:** [September 27, 2019, 3:25pm UTC](https://discuss.dgraph.io/t/graph-algorithms-implementations-in-dgraph/5153/2 "2019-09-27T15:25:05Z")

</div>

> [@shoukat](#):
>
> Shortest Paths

We have K-Shortest Path Queries [Get started with Dgraph](https://docs.dgraph.io/query-language/#k-shortest-path-queries)

> [@shoukat](#):
>
> Pageranks

nope, but there’s a similar thing we gonna support in the future.

For now, there’s no way to use algos without hard code it in the code base. Also, If you have a sense of how to implement them, PRs are welcome.

---

<div class="post-metadata">

**Author:** ![shoukat](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@shoukat](https://discuss.dgraph.io/u/shoukat)\
**Post date:** [September 30, 2019, 5:18am UTC](https://discuss.dgraph.io/t/graph-algorithms-implementations-in-dgraph/5153/3 "2019-09-30T05:18:44Z")

</div>

Thanks Michel, How about ways to derive centralities? Do we have any template  
Also any reference how to write BFS or DFS queried?
