Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit testing of resolvers: only LambdaAuthIdentity supported for context, we need Cognito support #293

Open
ben-elsen opened this issue May 23, 2023 · 0 comments
Labels
feature-request New feature or request

Comments

@ben-elsen
Copy link

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:

{
      '$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"])'
      }
    }
@onlybakam onlybakam added the feature-request New feature or request label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants