Hi everyone ![]()
I’m using the new versioning feature in Directus, and I’m wondering if there’s a way to retrieve an item together with its related children that share the same version name.
For example:
Let’s say I have a collection called Posts, which has one or more related Authors.
Both collections have versioning enabled.
If I have a Post with a version named "test", and one or more Authors also have a version named "test", I’d like to retrieve the Post "test" along with its Authors also in version "test".
If some Authors don’t have a "test" version, they should fall back to their "main" version.
So the desired result would be something like:
-
Post → version
"test" -
Authors → version
"test"(if available), otherwise"main"
Is there currently a way to do this via the API or SDK?
Or would it require a custom endpoint / flow logic to achieve this behavior?
Additionally, it would be a great feature if, when promoting a Post version, there was an option to also promote all related items (like Authors) that share the same version name.
That way, you could keep the hierarchy of related content consistent across versions without having to manually promote each related item.
Thanks in advance for any guidance ![]()