-
Notifications
You must be signed in to change notification settings - Fork 170
feat(event-handler): add support for error handling in AppSync GraphQL #4317
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
feat(event-handler): add support for error handling in AppSync GraphQL #4317
Conversation
…DatabaseError in AppSyncGraphQLResolver
… error types in AppSyncGraphQLResolver
…in AppSyncGraphQLResolver
…ame for better clarity
…n is based on error class name
Hi @arnabrahman, thanks for responding to all the comments and making the necessary changes! We'll be back with this PR and review next week. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR and for the patience, I was meant to review this on Friday but I had some personal issues and couldn't get to it.
I've left a couple questions and a few suggestions - once they're addressed we're ready to merge.
examples/snippets/event-handler/appsync-graphql/exceptionHandling.ts
Outdated
Show resolved
Hide resolved
examples/snippets/event-handler/appsync-graphql/exceptionHandling.ts
Outdated
Show resolved
Hide resolved
packages/event-handler/src/appsync-graphql/AppSyncGraphQLResolver.ts
Outdated
Show resolved
Hide resolved
packages/event-handler/tests/unit/appsync-graphql/AppSyncGraphQLResolver.test.ts
Outdated
Show resolved
Hide resolved
packages/event-handler/tests/unit/appsync-graphql/AppSyncGraphQLResolver.test.ts
Outdated
Show resolved
Hide resolved
packages/event-handler/tests/unit/appsync-graphql/AppSyncGraphQLResolver.test.ts
Outdated
Show resolved
Hide resolved
packages/event-handler/src/appsync-graphql/ExceptionHandlerRegistry.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
…ing.ts Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
…ing.ts Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
…ver.ts Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
…QLResolver.test.ts Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
…QLResolver.test.ts Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
Co-authored-by: Andrea Amorosi <dreamorosi@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this feature @arnabrahman - apologies if this has taken a bit longer than usual to get merged, we really appreciate your contribution!
|
Fantastic work @arnabrahman. Another fine addition! |
Summary
This PR adds support for error handling in AppSync GraphQL described in the issue
Changes
exceptionHandler
method is introduced to register an exception and its handler.ExceptionHandlerRegistry
is introduced to keep track of registered exception handlersexceptionHandler
is also exposed as a decorator methodendregion
added)Lambda handler:
APPSYNC JS resolver
Response mapping template
Response:
Issue number: closes #4130
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.