In addition to conditionally loading attributes, you might conditionally embrace relationships in your resource responses primarily based on if the connection has already been loaded on the model. This allows your controller to resolve which relationships must be loaded on the model and your useful resource can simply embody them