Skip to content

The relationships of top level resource are not parsed #8

@teamghi

Description

@teamghi

Hi guys,
i found a bug relating to the inclusion of related resources, when having a nested inclusion like
/api/users?include=bookings.requestedBy

The root cause is the relationships of top level resource are not parsed when there is the same resource object appeared as relation data in the previous parsed resources
this is the related code https://github.com/laravel-json-api/neomerx-json-api/blob/master/src/Parser/Parser.php#L237
the top level resource contains relationships, but because this seenBefore logic it is ignored, so its relationships have not been parsed
Could anyone help to check that ?
thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions