Closed Mhm0ud closed 2 years ago
I think since this lambda is a graphql serverless service it requires an event payload that of the HTTP request. If you try to invoke this lambda using a simple object in payload it will result in the same error. Try to hit this lambda via AWS api-gateway by setting up the trigger. It should work
That's correct; apollo-server-lambda is designed for particular AWS HTTP interfaces. For direct invocation you need to make your object match one of those formats
https://github.com/apollographql/apollo-server/pull/5789 improves the docs to explain what to do.
I have created a simple app to deploy the apollo server to lambda function using serverless framework, I followed this instruction My app structure as the following:
index.js content:
serverless.yml content:
run the following command:
npm i
serverless invoke local --function graphql
I get this error:
it's a simple app, but it's not working.
serverless --version