-
Notifications
You must be signed in to change notification settings - Fork 2k
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
apollo-server-lambda does not support API Gateway payloadFormatVersion 2.0 #5084
Comments
Hmm. I think we need to do a better job of understanding in all cases what the event object provided to Lambda is. That said, at this point I'm leaning pretty strongly towards getting out of the business of slowly reimplementing I mean I can just change the |
I'm getting the same issue with apollo-server-lambda "^2.22.2" |
fyi, can fix this by aliasing there are only two possible payloads for API Gateway Lambda and they are documented here: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html |
@brianleroux Thanks, that's helpful.
It looks like what your link says is that there are two API Gateway lambda payload versions, and the current code only supports version 1.0. This seems like something I can plausibly fix today and get into v2.23.0 which should be out today or Monday. |
awesome, thank you! appreciate it. 🙏 |
@brianleroux I can't find any docs explaining the difference between |
Fixes #5084. The sooner we get out of the business of understanding Lambda event formats, the better. But this fix should be good for now.
@brianleroux I'm using |
@glasser threw up a couple of greedy endpoints that echo the request for testing: http apis v2 payload: https://music-oib-staging.begin.app I think looks like they are consistent / but verify! |
Fixes #5084. The sooner we get out of the business of understanding Lambda event formats, the better. But this fix should be good for now.
I've released a prerelease with this fix, version |
(as a workaround you can also switch your setup to using payloadFormatVersion 1.0) |
This is released in Apollo Server 2.23.0. |
Thank you! |
Thank you guys |
When I add integration: lambda and authorizer it is throwing TypeError: event.path.endsWith is not a function error
As per my observation, without integration lambda and authorizer, I get event.path = {} whereas nornally it is '/'
dependency:
"apollo-server-lambda": "^2.22.2", "serverless": "2.31.0",
handler:
Expected:
Should not break with TypeError: event.path.endsWith is not a function error
The text was updated successfully, but these errors were encountered: