Hi,
I have a Project
resource. It has many Note
and many Product
resources as relationships.
I would like to present a list of these two types of resources mixed in the UI – they will be in folders in a tree view. I can load all the resources in the live_view and make a mixed list there, but I would rather use relationships and have it be available through the e.g. the API and get pagination and stuff as well.
I saw the documentation for polymorphic resources, but I did not figure out how one relationship can source from different tables, and how e.g. when loading the resulting struct is a mixed array, of in my case Note
and Product
resources.
Is that possible, or will I have to define a custom relationship?