Also does anyone know if it’s possible to predict ...
# prisma-whats-new
a
Also does anyone know if it’s possible to predict the position of adding an element to a gcool array? My mutations correctly add elements to an array but they’re inserted in what seems to be completely random positions
a
@aurnik In general, never trust database order. Always be specific about the order you want to display items in.
a
@agartha That’s what I figured, so then to maintain an order based on the date something was added to an array would I need to create a separate intermediary node type that holds the added date?
a
Every type has a createdAt date inserted automatically
Ah, that's not what you mean, you maintain the order before inserting using a date field
a
An example would be bookmarks, I could have a Bookmark type that has its own createdAt but I could also have a Collection type with a field of [Bookmark], however this field shouldn’t be sorted by each Bookmark’s createdAt but rather the date that it was added to the Collection
a
Yes to store that information you need a meta-type in between