I have a query in my aws app-sync:
input TestingInput {
user_ids: [String]!
}
Now, I need to do 2 different validations here:
- Validate that the user_ids is an array of strings.
- Validate that all user_ids exists in database.
For 1, I can use $util.isList()
, but it cannot verify the if there is empty string of not. Is there any way we can filter out the empty string from array and then check the length of array?
For 2, no idea as of right now