3

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)"
]

}

Waruna
  • 162
  • 8

2 Answers2

0

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.

0

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

hardcore
  • 121
  • 12