-
Notifications
You must be signed in to change notification settings - Fork 34
Ensure relationship renders independent of fields #98
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
Conversation
@richmolj why did you decide to make this change against the specification? This has broken our app. I get your point that the spec is somewhat imperfect regarding conflicting |
Because it was breaking other clients, who (rightly) thought they should not have to duplicate the relationship name in
I'd happily merge a PR.
This is unclear to me. Graph database or not, relationships are restricted via |
The spec says:
So when using sparse field sets you should be able to return only specific attributes or relationships.
This change breaks the spec because you can no longer define the requested relationships to be returned in the payload, it's returning all of them ignoring the |
@lshimokawa yes, this is noted in the linked issue, we have tried to raise the issue but haven't gotten much traction.
Can you not do this with |
@richmolj the major issue here is that even if you do not request any relationships via What you are calling breaking for other clients is hardly breaking. It has not worked differently before and it is just merely inconvenience to specify things twice as per specification while not having a workaround for previous functionality without forking is a breaking change. |
I think the real issue here is the What we really need is a 1.0 version, that commits to no backwards-incompatible changes and a changelog describing the changes we are making. This is why we are moving to Graphiti, the 1.0 version of JSONAPI Suite. Graphiti is just ending its beta stage, and we'll enter Regarding this specific issue, Graphiti will not render relationships if not present via the I've been working on this issue for years and from everyone I talked to, the only reason the spec reads this way is because relationships can be rendered by default. Graphiti will never do this, which means the reasoning behind the spec does not apply. I stand by that logic, but agree it is a problem if we are introducing backwards-incompatible solutions without a changelog. This is why I am devoting my efforts to a backwards-compatible 1.0 solution in Graphiti. |
Explained jsonapi-rb/jsonapi-serializable#102