I want to unit test my resolvers but when I provide a context object with an identity object that is formed according to cognito userpool authentication, I get the following error:
{
'$metadata': {
httpStatusCode: 200,
requestId: 'd699c6c6-9a8e-4dc2-8bd7-70c98203e4d1',
extendedRequestId: undefined,
cfId: 'r-mlNekQJDDZrWKFs0byMvdNYSl2PBMUbkWSvKh7cvVgIDbJAj54iA==',
attempts: 1,
totalRetryDelay: 0
},
error: {
message: 'Unrecognized field "sub" (class com.amazonaws.deepdish.common.identity.LambdaAuthIdentity), not marked as ignorable (one known property: "resolverContext"])\n' +
' at [Source: UNKNOWN; line: -1, column: -1] (through reference chain: com.amazonaws.deepdish.transform.model.MappingTemplateContext$MappingTemplateContextBuilder["identity"]->com.amazonaws.deepdish.common.identity.LambdaAuthIdentity["sub"])'
}
}
Hi,
I want to unit test my resolvers but when I provide a context object with an identity object that is formed according to cognito userpool authentication, I get the following error: