Problem/Motivation
The issue is about adding a Relationship
value object to wrap/replace entity reference fields within JSON:API. Having this abstraction is valuable because, unlike an entity reference field, a JSON:API relationship can have unique links/URLs of its own and is able to reference any resource regardless of its type (an entity reference field is limited to just one entity type). The former abstraction is useful for the JSON:API Hypermedia module and the latter will lay useful groundwork for supporting dynamic entity reference fields, reverse relationships, or resource types that aren't tied 1:1 with the entity system (useful for component-based decoupled designs).
Proposed resolution
Add a Relationship
object that can act as a container for the resource identifiers that represent a relationship between a resource and other resource(s). This container can be used within a resource object or within a top-level object, depending on the context of the request (is it a request for a resource object or is it a direct relationship request).
Remaining tasks
Reviews, commit
User interface changes
None.
API changes
"It's complicated". See #32.1, #36.7, & #38.7
Data model changes
None.
Release notes snippet
None.