Sorry, we don't support your browser.  Install a modern browser

Sortable Union Relation support#49

We’d like to be able to build pages with dynamic content and the types of content differs per page.

We create a few models:

ResponsiveVideo landscapeUrl

TwoImageRow introText

ContentComponentX { … }
ContentComponentY { … }
ContentComponentZ { … }

And with that we create a union:

union ContentComponents = ResponsiveVideo | TwoImageRow | ContentComponentX | ContentComponentY | ContentComponentZ

Now we use this union as a relation field in one of my models.

It should allow me to select any of the created entries within this Union, sort them in any way i’d like.

Bonus points for allowing me to create the entries inline without an additional overlay.

a year ago

100% this. I thought I had a request for it on the old backlog, before they moved over to nolt. However, as I understand it, input union types still aren’t properly supported by either GraphCMS or Prisma, so this may be a pipe dream, but it’s a pretty big requirement for lots of real-world data modeling and applications.

a year ago
Changed the status to
In Development
9 months ago
Merged Polymorphism#55
9 months ago
Changed the status to
7 months ago