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

Types for AppSync lambda resolver don't match #227

Open
ScottSWu opened this issue May 29, 2022 · 1 comment
Open

Types for AppSync lambda resolver don't match #227

ScottSWu opened this issue May 29, 2022 · 1 comment

Comments

@ScottSWu
Copy link

Hi, I'm using AppSync + GraphQL + Lambda Resolvers through Amplify (v8.3.0). I'm using TypeScript to write my lambda resolver, but the type of event seems slightly different from the definition for AppSyncResolverEvent in @types/aws-lambda.

The actual event object looks like:

{
    "typeName": "Mutation",
    "fieldName": "createInitialMedia",
    "arguments": {
        "projectId": "07a46207-19fb-439c-91a8-490e09dc86f7"
    },
    "identity": {
        ...
     },
    "source": null,
    "request": {
        ...
    },
    "prev": {
        "result": {}
    }
}

Is AppSyncResolverEvent the wrong type to be using here? Or is this event object format specific to Amplify?

schema.graphl for reference:

type Mutation {
  createInitialMedia(projectId: String!): Media
    @function(name: "mediaApi-${env}")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants