-
Notifications
You must be signed in to change notification settings - Fork 424
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
Unclear if :relationships can be hydrated #105
Comments
This is the json-api "standard". Maybe you could try GraphQL for what you ask or you could send your data under the "included" key like so:
|
This is (kind of) a duplicate of #101, but with the inclusion of the request for sparse fieldsets. JSON API already has specified how apis should handle these things, with includes (http://jsonapi.org/format/#fetching-includes) and sparse fieldsets (http://jsonapi.org/format/#fetching-sparse-fieldsets). Some more pointers to the JSON API docs in the readme might squash these questions. It seems that sparse field sets are currently not supported. |
The request is not supported by jsonapi standard as @hidde-jan has answered. A combination of includes and sparse fieldsets should provide similar functionality. Includes is supported by not sparse fieldsets. Closing as sparse field sets are already captured as an enhancement |
Hi!
Dunno if this is more of a concern of http://jsonapi.org/, but:
it is unclear whether the items contained in
:relationships
can/should have richer keys than justid
andtype
."relationships":{"foos":{"data":[{"id":"2","type":"foo"}]},"bars":{"data":[{"id":"8","type":"bar"}]}}
When one sees this generated json, may wonder "can I have more fields there?"
I am aware that there's
included
, but ideally one would avoid generating bloated representations. Particularly for a performance-sensitive lib :)Cheers - Victor
The text was updated successfully, but these errors were encountered: