Apollo graphql service on AWS Lambda Cannot read property 'Accept' of null
{
"errorType": "TypeError",
"errorMessage": "Cannot read property 'content-type' of undefined",
"stack": [
"TypeError: Cannot read property 'content-type' of undefined",
" at fileUploadHandler (/var/task/node_modules/apollo-server-lambda/dist/ApolloServer.js:144:50)",
" at Runtime.handler (/var/task/node_modules/apollo-server-lambda/dist/ApolloServer.js:167:13)",
" at Runtime.handleOnce (/var/runtime/Runtime.js:66:25)"
]
}
I believe this has to do with the test that you are sending to AWS Lambda. You are sending the default request most likely as when I did that I got the same error. Try testing your application using apollo client.
There is a breaking change in the apollo server. You need to write the file uploads line. https://github.com/apollographql/apollo-server/blob/main/CHANGELOG.md#v230
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.