-
-
Notifications
You must be signed in to change notification settings - Fork 531
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
RFC(adapter/aws-lambda): generalize LambdaEvent
, EventProcessor
#2726
base: main
Are you sure you want to change the base?
Conversation
LambdaEvent
LambdaEvent
LambdaEvent
LambdaEvent
, EventProcessor
As a contributor to adapter/aws-lambda, it would be great if tests were added to demonstrate this change fixes #2723. It appears that the issue reporter attempted to let Hono handle Lambda's Function URL: I am not sure making Hono handle |
LambdaEvent
, EventProcessor
LambdaEvent
, EventProcessor
Basically, I think that Hono's standard repository should handle HTTP requests. I personally disagree with making the role of the adaptor too fat. |
Sorry, I failed to delete this in v4. |
@exoego I'm also unsure about adding However, coming back to the issue with the GraphQL middleware (#2723), I'm not familiar with GraphQL and previously I thought graphql connects using it's own protocol, hence the issue of "requestContext" undefined, but reading more about it, it's using GET/POST HTTP method, Function URL is using "APIGateway V2 Payload" so it should be already supported and requestContext should exists. So we might have a different bug here. I'll set up a reproduction and find the real cause for #2723 later when I have time. |
Resolves #2723 - Edit: unsure, see #2726 (comment)
Lambda's event could come from any source, e.g: manual invokations, AWS triggers like S3, EventBridge, etc. So it should have the type of
unknown
This PR generalizes
EventProcessor
to accept anunknown
event, with the old processor logic for "Request"-based event sources moved toRequestEventProcessor
Because the processor's logic was moved to a different file, for easier reviewing what have really changed, the maintainer could check specifically the commit: fix: generalize LambdaEvent
The author should do the following, if applicable
bun denoify
to generate files for Denobun run format:fix && bun run lint:fix
to format the code