How can I found the Longhest Path in a Graph?

Hi all,
I have a graph of invoices issued by companies to other companies I need to understand which are the longest continuous paths, they find GDS algorithms for shortest path but I can't find any for longhest path. Help would be super
Thank you
Attached is a schematic example of the graph

You should be able to use DFS for this: Depth First Search - Neo4j Graph Data Science

Thanks a lot Alicia, will try and let you know
Regards
Rinaldo