Right now, a resource can only be reloaded if its links have been set (via JSON API query to a resource server)
But if we know @links['related'], which could be http://example.com/api/v1/products/, and the resource was built like Product.build(id: 1), its not hard to state that we can reload it by adding the id to the related link. This is useful for instantiating a resource with just an ID via server rendering, then reloading it to retrieve all its attributes at runtime.
Right now, a resource can only be reloaded if its links have been set (via JSON API query to a resource server)
But if we know
@links['related']
, which could behttp://example.com/api/v1/products/
, and the resource was built likeProduct.build(id: 1)
, its not hard to state that we can reload it by adding the id to the related link. This is useful for instantiating a resource with just an ID via server rendering, then reloading it to retrieve all its attributes at runtime.