Skip to content

Support for expand parameter in live loader #60

@pawcoding

Description

@pawcoding

Motivation

In our quest to add the expand parameter let's first add it to the experimental live loader.

Proposed Solution

Add a experimental.expand option to the live loader, which adds this parameter to the API requests for both collection and single entry endpoints. The option should be configured as a Array, following the same format as the PocketBase expand implementation, but splitting each entry into it's own string instead of concatenating all of them via ",". This will be done under the hood and makes it easier for us to handle multiple expand parameters. Invalid configurations should simply propagate the error returned by PocketBase, though we'll enforce a strict limit of 6 level deep nesting like PocketBase.

This does not include any schema generation (most complex part of this whole quest) or option for the build time loader (which requires more adjustments for the caching, etc.). This will also not be compatible with the fields option for now.

Testing Requirements

  • Add unit and end-to-end (e2e) tests to cover the new option and its integration

Documentation

Additional Context

Metadata

Metadata

Assignees

Labels

priority/medium[internal] This is not a priority right now but will be done eventuallyteam/internal[internal] This will be done by the core teamtype/featureNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions