-
Notifications
You must be signed in to change notification settings - Fork 8
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
Confused about RelData #120
Comments
In this example, all resources of type You might want to include extra resources under the I also can't make Maybe the library could verify the integrity by making sure To answer you second question, you would need to add Using the relationship tree for So that's how it currently works. It works and it's not broken, but there is room for improvement. Let me know if that answers your questions. I'm open to ideas. I'll keep this open for now to remind myself to think about this issue. |
Thanks for the explanation. It seems JSON:API has more quirks than I expected. I appreciate your work. Feel free to close when you wish. |
Document
has a field calledRelData
, which is described as "Relationships where data has to be included in payload". RelData does not get set anywhere, and it appears that it is the job of the handler to set it.However if the url specifies a "include" in the query parameters it seems RelData should be fully determined by that.
In
URL.Param
there is aRelData
field too, but it never gets set, even if I have a url that specifies an `?include=...".Can you explain this? Thanks.
Second question: if I do set
Doc.RelData
manually in my handler how do I get he document to include second-level resources, like "/articles?include=comments.author".For normal relationships I can do:
But I can't figure out how to include "comments.author". A quick look at the code indicates this is not supported? Or am I missing something?
Thanks.
The text was updated successfully, but these errors were encountered: