directus / directus/rstore

Partials

Open
#40 2 comments 0 reactions 0 assignees View on GitHub
documentation rstore
Dominant language
TypeScript
Stars
449
Forks
21
Avg merge
6d 22h
Merged PRs (30d)
2

Description

### Clear and concise description of the problem

Lets say I have a model called "product". If I display a list of products, I dont want it to contain ALL fields that a product may have, I only want to show imageUrl, name and price. But if I click into the product detail I want to load more fields (but maybe still not all of them). How would such be done in Rstore? How would Rstore know what fields are missing, or would it require to setup a model productList and productDetail ? Reading the docs it seems like it is always an all or nothing.

Another example: An order has a many to one customer relationship. When viewing an order I dont want to get the full customer which may contain a lot of sensible data, instead I just want to get his id and his address. But with Rstore it seems like I can only get everything or nothing?

### Suggested solution

If this is possible atm, it would be a documentation issue. Otherwise please consider as a feature request :)

### Alternative

_No response_

### Additional context

_No response_

### Validations

- [x] Follow our [Code of Conduct](https://github.com/Akryum/rstore/blob/main/CODE_OF_CONDUCT.md)
- [x] Read the [Contributing Guidelines](https://github.com/Akryum/rstore/blob/main/CONTRIBUTING.md).
- [x] Read the [docs](https://rstore.starpad.dev/guide/).
- [x] Check that there isn't [already an issue](https://github.com/Akryum/rstore/issues) that requests the same feature to avoid creating a duplicate.

Contributor guide

Open the contributing guide

Research direction

Start with the Rstore guide linked in the issue and determine whether partial model fields and relationship fields are already supported. Done means either documenting the existing configuration clearly or addressing the requested partial-loading behavior for product lists, details, and customer data.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
data
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.