Hey <@U0RQY0KK5> or others - I’ve got a schema whe...
# prisma-whats-new
w
Hey @nilan or others - I’ve got a schema where the User has a field called Cart which is a relationship of [Item] - how do I order those items? It seems they don’t order by when I push them in - but by the item creation date
n
hey 👋 relations are unordered lists - you can order them by any field on the type
so in your case, you could add a
position: Int!
property to
Item
or, to be even more flexible, you could use a String or Float property - here's a relevant discussion: https://www.graph.cool/forum/t/insert-object-in-a-relation-at-given-index/860?u=nilan