-
Notifications
You must be signed in to change notification settings - Fork 182
Accessing included data that is only in the primary data #299
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
Labels
Comments
@fusion2004 I think it should be configurable behavior (by default it should not lookup up in dataset) |
Alrighty, hopefully we'll have time soon to package this into a PR! |
senid231
added a commit
to senid231/json_api_client
that referenced
this issue
Oct 3, 2018
senid231
added a commit
to senid231/json_api_client
that referenced
this issue
Jan 14, 2019
senid231
added a commit
to senid231/json_api_client
that referenced
this issue
Jan 15, 2019
@senid231 maybe just a bug in jsonapi-resources, seems out of spec |
@senid231 Thanks for doing that, I never ended up getting the time to come back to this. Your implementation looks much simpler than what we hacked together, too. |
senid231
added a commit
that referenced
this issue
Jan 23, 2019
#299 optional get relationship from dataset
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
So, I'm having an issue that I'm not sure to which gem the fix should go. I'm requesting data from an index and including a relationship which references another record in that same data set, similar to this:
GET /tasks?include=parent
The gem I'm using is
jsonapi-resources
, and it seems to try and optimize this as shown: If the data you tried to include was in the primary dataset, then don't also add it to the included dataset. I can't seem to find any clear documentation in either the JSON API spec or recommendations regarding this case.Would you be open to a PR implementing a lookup for included data that also checks the primary dataset? If so, should this gem default to using that fallback, or should it be a configuration setting?
The text was updated successfully, but these errors were encountered: