jazz icon indicating copy to clipboard operation
jazz copied to clipboard

Resolve: add a way to request a n-levels deep load

Open gdorsi opened this issue 6 months ago • 1 comments

Some of our adopters have very complex CoValue schema shapes, which makes very hard to define by hand all the props to resolve.

It would quite useful to be able to specify "load the entire CoValue dependencies all at once" to skip the manual declaration process when that's the main goal.

API-wise I'm thinking about something like this:

const { me } = useAccount(MusicaAccount, {
    resolve: { root: { rootPlaylist: { $deepLoad: true }, playlists: true } },
  });

With this resolve everything inside the rootPlaylist will be deeply loaded

Edge cases:

  • Circular dependencies should be handled by reusing the same refs (should be doable)
  • FileStream and CoFeed types should be skipped
  • Do we need a depth level cap?

gdorsi avatar Jun 02 '25 18:06 gdorsi

This would be a necessary implementation for any tree-like data structure especially if you are trying to display the whole tree.

maloguertin avatar Nov 05 '25 23:11 maloguertin