-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include data
key when lazy-loaded relationships are included
#10
Include data
key when lazy-loaded relationships are included
#10
Conversation
end | ||
end | ||
|
||
def meta_hash(record, params = {}) | ||
meta_to_serialize.call(record, params) | ||
end | ||
|
||
def record_hash(record, fieldset, params = {}) | ||
def record_hash(record, fieldset, includes_list, params = {}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If includes_list doesn't have a default value here, it could be a breaking change.
@@ -34,12 +34,12 @@ def initialize( | |||
@lazy_load_data = lazy_load_data | |||
end | |||
|
|||
def serialize(record, serialization_params, output_hash) | |||
def serialize(record, included, serialization_params, output_hash) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a breaking change. New parameters should generally be appended to the list and included a default.
@kpheasey I've looked into the possible breaking change issues with the method params on @dpikt Can you look into the conflict in the spec. Thanks. |
Resolves Netflix/fast_jsonapi#357
When a relationship is listed under
include:
, it will add the data key to the record hash, allowing the included relationships to be reconstructed.