Querying for leaf nodes using libgraph?

I’m working on a project where I need to track dependencies between several items. In some cases this working set my contain 100k or so vertices and maybe 300k edges. I’m looking for an efficient way to get just the leaf nodes so i can do the work for those nodes, then prune the graph and repeat to efficiently work my way through the graph.

Has anyone done a project along these lines? Or used libgraph or digraph to find leaf nodes efficiently?

The only thing I can say is that both of these projects should work very good just based on the fact that the first is made by @bitwalker and the second is part of OTP. I guess the biggest difference should be the fact that libgraph is more elixir friendly, as from libgraph readme:

An idiomatic Elixir API for creating, modifying, and querying its graph structure. Creating and modifying a graph can be done in a single pipeline, and all queries take a Graph as their first parameter (one of my complaints with :digraph is that there is some inconsistency with the API between :digraph and :digraph_utils for no apparent reason).