-
Notifications
You must be signed in to change notification settings - Fork 4
Description
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
- Update the README to describe the new option at a fitting position, following the style of existing documentation
- Include a link to the PocketBase documentation for the expand API: https://pocketbase.io/docs/collections/#expand-relation-fields
Additional Context
- This is an additional feature and not a breaking change
- There is already a prototype in Support for
expandparameter in live loader #75 though it tries to do all sub-issues at once. It can still be referenced for looking at documenting the new feature. - See Support for
expandparameter #59 for more information