amazon-archives/aws-appsync-rds-aurora-sample

autoId (128 bits) vs varchar(64)

Ricardo1980 opened this issue · 2 comments

Hello,

I see in the resolvers you use autoId, which returns a 128 bit uuid, or a 16 characters string.
However, in the SQL crearion statements, I see that the id type is varchar(64).
Shouldn’t that be varchar(16) or binary(16)?

Thanks.

Feel free to optimize the sample further if the larger varchar size feels unnecessary.

I'm using BINARY(16) with UNHEX and HEX (alias), and everything is working fine.
Don't forget to remove the hyphens .