Read a Chain of objects in a single stream

I have implemented a Commit Chain on IPFS, which my application uses to add individual commits.
It uses the DAG api to create chain link objects, where the chain link object points to two other objects, the next link in the chain and the commit.


//chain link

{"Links":[],"Data":"<some payload>"}

When indexing the commit chain I need to read the chain in its entirety.

The indexing service uses the js-ipfs-api to communicate with an IPFS node running in another container.

This means that I have to make an http request for each Link of the chain and each commit.

This has some overhead and I would like to instead just do something like:


Which outputs a stream of the entire tree with data. This should be much faster.

Does anybody have any experience with a similar use case where they did something different? - or is there a command I have missed?