Skip to content

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

@gdorsi

Description

@gdorsi

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?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions