You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm up for supporting this if/when it gets into the spec. Note that in your case, you can always pre-compute the depth of the tree and build an adequate include directive.
# To support recursive include directives# e.g.: 'children[*]'moduleActiveModelSerializersmoduleAdapterclassJsonApidefprocess_relationships(serializer,include_slice)if(key=include_slice.to_hash.keys.first.to_s).end_with?('[*]')rel=key.remove('[*]')new_rel="#{rel}.#{rel}[*]"include_slice=JSONAPI::IncludeDirective.new(new_rel,allow_wildcard: true)endserializer.associations(include_slice).eachdo |association|
process_relationship(association.serializer,include_slice[association.key])endendendendend
something like: json-api/json-api#940
basically, if you have a tree structure, where your relationships are parent/children, you can never get all the children.
The text was updated successfully, but these errors were encountered: