Open martindale opened 8 years ago
Alternatively, if resources contain pointers to other resources, perhaps the UX layer should always be the one handling this. Thoughts, @chrisinajar?
What does the populate gesture do? It's probably a Data Layer or maybe Application State responsibility...
The populate
option indicates that, when a resource is retrieved in a specific context (query
vs. get
, for example), any references to other documents should be replaced with the actual documents themselves. It's a "hyperlink" to another, separate (but related) document.
I imagine that in the production deployment of Fabric, these will always be document hashes (the content-addressable part), but for now we are mainly using Mongo's ObjectIDs.
When a Resource has a particular attribute configured to be "populated" for specific methods, these rules are not respected when the parent resource emits update events:
For example, from Melody:
Perhaps handlers for the
populate
option should be expanded to include theupdate
orpatch
methods.