If the graph is a DAG, then the first idea that would come into my head is a DP with memoization:
DP[v] -> the longest chain starting from vertex v.
Then DP[v] = 1+max{DP[w], w in Adj(v)}.
You can easily compute this with memoization
Your answer is then max{DP[v]} for each vertex
If the graph is ~~unconnected, ~~undirected, then it is a forest of trees, and this is a whole different problem (diameter of a tree)