Tree Traversal in Strapi


I am wondering if Strapi has a quick and easy way to learn something about trees constructed through relations.

Let’s say I have content types that all relate to each other like this:

                    Type A
                /              \
           Type B              Type B
         /         \         /         \
   Type C        Type C     Type C   Type C


I see in my example sqlite database has through tables relating content, i.e.,


What I’m curious about is if there is an easy-ish way in Strapi to, given a Type C item, can I figure out what Type A item is at the root of the tree?

1 Like