Avoid send the full array of items when not edited using a property to know it status #10179
RPdvtPT
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Take a look at this collection, its a Livenews object, that can have several posts:
If I've a list of 300 livenews posts, everytime that the livenews object is saved (or autosaved), the posts object will have 300 items, it would be nice to have a hidden property with 3 states (created, updated, deleted), and only send in the POST request those with this property:
{ _status: 'updated', ...otherObjectProps }
){ _status: 'delete' }
)If 2 livenews posts where updated, 1 created and another 1 deleted, the array of livenews posts would send just 4 items in the POST request, instead of the 300 items.
The same could be done when changing the items order, and leaving the properties untouched (ex:
{ _sorted: 23 }
)Beta Was this translation helpful? Give feedback.
All reactions