Skip to content
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

The relationships of top level resource are not parsed #8

Open
teamghi opened this issue Oct 1, 2024 · 0 comments
Open

The relationships of top level resource are not parsed #8

teamghi opened this issue Oct 1, 2024 · 0 comments

Comments

@teamghi
Copy link

teamghi commented Oct 1, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant