我今天错误地通过我的反应应用程序更新了我的shema,并且由于我在appsync上进行了更改,因此更改丢失了。现在我已经花时间重新创建了丢失的表并制作了解析器,但现在我所有基于表索引过滤的查询都停止工作了。我经常收到以下错误:
One or more parameter values were invalid: Condition parameter type
does not match schema type (Service: AmazonDynamoDBv2; Status Code: 400;
Error Code: ValidationException;
Request ID: PP50VGJ3P7GIE46BL619R6IB0VVV4KQNSO5AEMVJF66Q9ASUAAJG)
以下是我的解析器:
{
"version" : "2017-02-28",
"operation" : "Query",
"index": "userId-index",
"query" : {
"expression": "userId = :userId",
"expressionValues" : {
":userId" : $util.dynamodb.toDynamoDBJson($ctx.identity.sub)
}
},
"nextToken": #if( $context.args.nextToken )
"$context.args.nextToken"
#else
null
#end
}
我不明白问题是什么,但希望有人可以帮助我。 多谢!
问题解决错误地将我的 API 从认知池更改为 API 密钥,从而导致错误。