Appsync resolver context not working, used literal strings somehow

0

Been using this resolver fine, but after an update at some point, the userId has been the literal string "${ctx.identity.cognitoIdentityId}" instead of being replaced with actual Id. Now I'm not sure how to make it work.

{
            "version" : "2017-02-28",
            "operation" : "GetItem",
            "key": {
              "userId": { "S": "${ctx.identity.cognitoIdentityId}" }
            }
}
已提問 10 個月前檢視次數 263 次
1 個回答
0

nevermind, as it is clearly stated here, https://docs.aws.amazon.com/appsync/latest/devguide/resolver-context-reference.html#aws-appsync-resolver-context-reference-identity , when you change the auth type the data structure changes.

已回答 10 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南