-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Side loading doesn't work in 0.10.0.rc1 (non-JSONAPI) #899
Comments
+1 I’m using ember-data, is there a way to achieve the same format I had with 0.8.x? That is with |
This is currently the only thing stopping me from upgrading to 0.10.x. In order to maintain the same API format and prevent breaking our client, I need to be able to sideload objects in the root. |
Now I hear that ember data is aiming to the same JSONAPI format that AMS 0.10.x is defaulting to. Plus it should ship a compatible beta version somewhere in June. Can someone confirm this? Enviado de um aparelho móvel.
|
For what it's worth, we aren't using the JSONAPI spec, but we still need to sideload data. I've been playing around with the JSON adapter in order to add the functionality back. I'll see if I can get a proof-of-concept together. |
Hey everybody, I'm just jumping in to let you know that I'm following this and will try to give it a closer look on the weekend. @meltingice would be awesome to have some prof-of-concept 😄 |
+1 |
I've been using a decorator pattern, decorating the collection with an instance variable that has my sideloaded query set and group_by(:foreign_key_id), then my individual decorator overrides the association method, doing a hash lookup based on the sideloaded hash or super if the hash was not passed in as part of the collection's context. For me this is necessary no matter what since my API consumer needs to pass in parameters limiting the scope of the association as well (has_many). |
+1 |
@henrymazza confirmed. Ember, as far as I know, is moving forward to use JSON-API. We had to remove it as default because of a WIP Rails integration, but it's already supported and extremely easy to use. |
We are not using ember, however we are using 0.9 with embed: ids, and sideloading. this works quite well for us however since we desperately need caching we'd like to upgrade to 0.10. As we have multiple clients for our api based on the above model updating the output to be compatible with json_api is a ways off. Is there a way to upgrade? // did someone make a json_legacy adapter maybe? I think this is definitely needed to avoid breaking all api's out there when upgrading to 0.10 I will take a stab at making a legacy adapter if none exists |
I have a pull request #1088 which I hope addresses this for most people |
Nice to see this being bumped! I'll check both PRs @ahmeij && @NullVoxPopuli |
Also see #1127 |
I've been trying to setup side loading using the standard adapter, (not JSONAPI), and have been unable to generate any embedded data. This works in 0.8.1 but the issue stated in #377 has lead me to trying 0.10.x. When I tried using the JSONAPI adapter I was able to get included/linked data.
The following is the basic setup I've been testing with:
The text was updated successfully, but these errors were encountered: