I’m trying to load records based on messages received through a WebSocket connection (using Faye). In
BREAKING_CHANGES.md it is suggested to use
load() on the adapter for this precise use case. It also mentions the API supports sideloaded data, but I don’t see how this would work because
load() expects a payload without a root. Am I misunderstanding the documentation or hasn’t the functionality been implemented yet? Is there another method on the store or adapter that I would need to invoke to load sideloaded data based on a payload?
Previously, some features of the store, such as load(), assumed a single adapter.
If you want to load data from your backend without the application asking for it (for example, through a WebSockets stream), use this API:
store.adapterForType(App.Person).load(store, App.Person, payload);
This API will also handle sideloaded and embedded data. We plan to add a more convenient version of this API in the future.