apollo-server-lambda: TypeError: Cannot read property 'endsWith' of undefined
See original GitHub issueUsing the playground, when try to load the page, this error is outputed:
TypeError: Cannot read property 'endsWith' of undefined
Seems to be the case of not every time or at least not at the first request that the event have the path attribute.
I printed the event object and could not find the path attribute.
{
headers: {
host: 'localhost:4000',
connection: 'keep-alive',
'content-length': '1468',
accept: '*/*',
'apollo-query-plan-experimental': '1',
'x-apollo-tracing': '1',
'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 Safari/537.36',
'content-type': 'application/json',
origin: 'http://localhost:4000',
'sec-fetch-site': 'same-origin',
'sec-fetch-mode': 'cors',
'sec-fetch-dest': 'empty',
referer: 'http://localhost:4000/',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'en-GB,en-US;q=0.9,en;q=0.8,pt;q=0.7,de;q=0.6'
},
multiValueHeaders: {},
body: '{...}',
httpMethod: 'POST'
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Apollo Gateway on AWS Lambda Cannot read property ...
I'm not doing anything with uploading, but looking at ApolloServer.js, I can see a handler is made. My index.js looks like this: const...
Read more >Cannot read property 'launchAPI' of undefined in Apollo ...
I'm trying the following query in Apollo Graphql Studio while checking the tutorial. However, It then indicates the error message, “Cannot read property...
Read more >Cannot read property 'endsWith' of undefined - Bountysource
Uncaught TypeError: Cannot read property 'endsWith' of undefined · [X] MaterialDesignFrameworkModule — Material Design · [ ] ...
Read more >— Adam Freeman - NIBM eHub
editorial fashion and to the benefit of the trademark owner, with no intention of ... Uncaught TypeError: Cannot read property 'setState' of undefined....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Good to know! Thanks for double-checking.
Uh-oh, this looks like a regression in v2.21.1 from #4892. I bet a little question mark should fix that up.