I want to query all the items between two dates using AWS AppSync. This my resolver :
{
"version" : "2017-02-28",
"operation" : "Query",
"index" : "userInfoDate-index",
"query" : {
## Provide a query expression. **
"expression": "userInfoDate BETWEEN :start AND :end",
"expressionValues" : {
":start" : { "S" : "${ctx.args.start}" },
":end" : { "S" : "${ctx.args.end}" }
}
}
//Schema
type UserQuestionInfo @model {
id: ID!
userId: String!
userName: String!
userInfoDate : String!
weight: String!
height: String!
}
type Query {
getWeightByCreatedAt(start: String!, end: String!): UserQuestionInfo
}
But I am getting this error :
Query key condition not supported (Service: AmazonDynamoDBv2; Status Code: 400; Error Code: ValidationException) I don't know what's wrong or this does not support between query. Please help