I want to find source vertex from target vertex,I know two methods Currently ：

1、reverse edge

2、start from all vertex, traverse to the receiver, then keep the particular vertex in the result set.

Is there an easier way ？such as restpp request using Built-in Endpoints? or ?

Looking forward to your reply.

Thanks.

Thank you for your reply. I mean that if i know target vertex, how could i find the source vertex?

**/shortestpath** endpoint need the information of source vertex, but my goal is to find the source vertex.

TigerGraph has an open source graph algorithm library. I would check out the section called “single source shortest path” that will start from one vertex and find all paths (in your case leading to your source vertex)

**Docs:**

**Repo:**

**Algo Code:**

https://github.com/tigergraph/gsql-graph-algorithms/tree/master/algorithms/schema-free

Let me have a try. Thanks for your help.

1 Like