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
portraitUrl
}
TwoImageRow introText
backgroundX
imageOne
imageTwo
}
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.
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.