The API should be able to retrieve the nested (related) items based on primary key _and_ mixed collection, meaning it can nest items from multiple different tables
What do we need to do next to support this? @rijkvanzanten @WellingGuzman
I think we can avoid calling it a UUID... this would use a new Directus specific PK type that concats the collection name and id:
articles-123
To achieve better clarity/visibility, we are now tracking feature requests within the Feature Request project board.
This issue being closed does not mean it's not being considered.
Here are some initial thoughts on M2X relationship.
M2X is kind of M2M so the flow for both of them will be the same.
I will consider 2 collections files and category with media M2X collection as an example for this DOC.
Basic Info
M2X collection will have below fields
Creation of M2X field
App Side Integration

API Side Integration
directus_fields table. But we need a single change in directus_relations table.
For M2M we had below entries in directus_relations table.

For M2X we need to replace the `collection_one` with any specific keyword. (Either we can use * or any)

Note: This values will be passed from `APP` only.
Insert Data
For M2M the payload is
{
"category": [
{
"category_id": {
"name" : "Lorem Ipsum"
}
}
]
}
We will require the below payload for M2X
{
"media": [
{
"collection_key": {
"type" : "category",
"data" : {
"name" : "Lorem Ipsum"
}
}
}
]
}
Fetch Data
Implement the needful changes into the current API for getting data of any collection.
Here, when we call the API of files we need to pass the type category to media table to get the category related media.
This looks great so far!
Right now we have been ideating on the Relation Settings design with something like this:

I defer to @rijkvanzanten on the data payload structure.
This would be a nice feature!!! Would take Directus content contribution to next level, making it not only a CMS, but also a kind of Page builder which allows sortable and modular componentes for pages.
Most helpful comment
This would be a nice feature!!! Would take Directus content contribution to next level, making it not only a CMS, but also a kind of Page builder which allows sortable and modular componentes for pages.