AppSync: how to compare strings lexicographically in VTL
I had been working on a client project where I built the GraphQL backend for a new social network using primarily AppSync, Lambda and DynamoDB. One of the features of the app was to support private messaging between two users. To allow either user to fetch their chat messages in chronological descending order, I modelled…