4 ms·
Does look pretty slick, but I imagine the flat nature of the content items will be limiting. In the example, song has an artist. But artist is a string vs a r
by tyingq 10y ago
Does look pretty slick, but I imagine the flat nature of the content items will be limiting. In the example, song has an artist. But artist is a string vs a related content item.
I can't tell if that's an MVP type decision and will change later, or a design decision that won't change in the future.
- benatkin 10y agoIs it flat like wikipedia or flat like S3?
- tyingq 10y agoNot sure. I don't see any support for item relationships. It could just be a lack of documentation though.
- nilslice 10y agoHi - you can make a relationship using the built in addon package, github.com/bosssauce/reference The reference is stored as a string (or []string if you opt for a reference.SelectRepeater input func), but the value stored as a reference is actually a URL path to the content as it would be accessed via the Content API. This becomes very powerful when you enable HTTP/2 Server Push, and declare the referenced content to be pushed when it's parent content is requested. The underlying data looks like this: Song id: 1 title: "Take Me Home, Country Roads" artist: "/api/content?type=Artist&id=2" If you enable H2 Server Push by implementing the Pushable interface (add a Push method that returns a []string of the JSON field names to push), the server will know to make a response for the referenced Artist field and push it down to the client when the parent Song is requested.