-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
JSON:API Inclusion of related resources #3454
Comments
Does you API return both Currently links have precedence over data so if both are present data will be fetched by links instead of local data. We're considering this a bug and it's tracked in #3380. |
I was reading that issue and I believe this is related but not the same. It seems at though @wwwdata api is returning the According to JSON:API specs, using 'included' to return information from primary data is optional. Basically, 'http://example.com/posts/1' could return this (ember-data uses the
But what if I wanted ember-data to do this instead
|
Hi, I think you are exactly describing the same problem that I have. My backend does not send the But it doesn't matter if you have a query parameter or not, ember-data does not handle both scenarios correctly. |
Ok, so it looks like this has already been a point of discussion #1576 but it doesn't seem like it has been solved yet #3281. Is the plan to have this work: In the meantime, I am trying to implement |
The |
Thanks @wecc Also had to change it to findRecord and remove the typeClass from the push since it's deprecated. |
We have an api built following the JSON::API 1.0 specs; all the data seems to be loading correctly through ember-data and the JSONAPI Serilaizer and Adaptor (polymorphic, async) except that related resources are sending unique requests to our api. It seems as though ember-data is expecting related data to always be returned instead of having it as a api/user option.
http://jsonapi.org/format/#fetching-includes
Basically, can ember-data handle requesting and loading the included data:
http://localhost:3000/api/apps/:id/responsibilities**?include=party**
Instead of requesting:
localhost:3000/api/apps/:id/responsibilities
and
[localhost:3000/api/party/:ids_from_responsibilities]
Thanks
The text was updated successfully, but these errors were encountered: