To make bulk updates to multiple instances of a resource, use the Bundle class. A bundle can be created with a list of instance ids and a
factory function that creates a new instance of the resource with the given id. Alternatively, a bundle can be created with a list of instances.
In order to make changes to the instances, the bundle object should be used as a proxy object. This will track all changes made to the object
and mirror them on the instances. When the update method is called, all changes will be sent to the API to update the instances.
Example
constbundle = newBundle<Story>({ids: [1, 2, 3]}, (data) =>newStory(data)) bundle.estimate = 3 bundle.update() // Changes are propagated to the instances and sent to the API
To make bulk updates to multiple instances of a resource, use the Bundle class. A bundle can be created with a list of instance ids and a factory function that creates a new instance of the resource with the given id. Alternatively, a bundle can be created with a list of instances. In order to make changes to the instances, the bundle object should be used as a proxy object. This will track all changes made to the object and mirror them on the instances. When the
update
method is called, all changes will be sent to the API to update the instances.Example