-
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: TypeError: Cannot read property 'endsWith' of undefined #5016
Comments
Uh-oh, this looks like a regression in v2.21.1 from #4892. I bet a little question mark should fix that up. |
That said I'm a little concerned that our TS types don't catch this. And it's not a matter of us being behind on In what context are you running your Lambda? Perhaps it's not behind "api gateway" and our choice of APIGatewayProxyEvent as the typing to use is not general enough? |
Glancing at all of I know I can just add the single question mark, but I'd like to understand a tad better what context you're seeing this pathless event in. Is this behind an ALB? |
@glasser thank you for your response. |
Good to know! Thanks for double-checking. |
@st-pimentel how did you solve this issue? I'm dealing with the same thing. Thanks! |
@atalebagha in my case not is a problem with the apollo-server-lambda
|
Seems like duplicate of #5084; this is about the two different API Gateway payload format versions. |
I've released a prerelease with this fix, version |
This is released in Apollo Server 2.23.0. |
Using the playground, when try to load the page, this error is outputed:
Seems to be the case of not every time or at least not at the first request that the event have the path attribute.
apollo-server/packages/apollo-server-lambda/src/ApolloServer.ts
Line 176 in 66f48b8
I printed the event object and could not find the path attribute.
The text was updated successfully, but these errors were encountered: