-
Notifications
You must be signed in to change notification settings - Fork 325
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
Support for JSON API's Compound Documents #353
Comments
@alexchumak this is actively being worked on (by me), so i hope so :-) https://github.com/hubert/her/tree/feature/jsonapi-compound-documents it's not quite ready to be merged in but i'll PR soon. there is one bit of work i needed to do with regards to has_one associations were being handled in order to get this to work, so that will need to get merged and then this will come soon after. comments welcome and appreciated. |
That's great news @hubert! I even forked it myself and was about start mucking around with it, but glad i asked first! Looking forward to taking advantage of this functionality. Do you have any sense as to when this might get merged into master? |
Hello @hubert. We are keen to help with this if we can. I've merged your earlier work and I see that your has_one PR has been pulled in. The basic assembly of compound documents seems to work very well and I like the way it simply prevents a future api call. Thank you for that. Is there other work in this area that we could help to finish? We are finding the jsonapi parsing quite fragile, especially around associations. I don't think that's related to the compound document parsing - more to do with #334 - but it becomes more important when bundles of stuff are being passed around. Happy to come up with something there too. |
@will-r @alexchumak i'd encourage you to share your thoughts on PR #360 i have some qualms with it, but now that 0.8.0 has gone out, i'd be more inclined to merge it in if there are active users who would benefit. @will-r do you have a example of the jsonapi parsing be fragile? i'd be keen to take a look. |
Hello, it would be great if her could parse the associations sent on "relationships". |
Using combination of
relationships
andincluded
related resources it is possible to avoid making many unnecessary API calls.http://jsonapi.org/format/#document-compound-documents
After parsing that response
activity.user_agent
should be present, without any additional API calls.Is there any appetite for adding this seemingly priceless functionality?
The text was updated successfully, but these errors were encountered: