Closed jakobloekke closed 1 year ago
Most likely a bug! Can you let me know which event type is causing the issue?
I'm following the guide at https://www.apollographql.com/docs/apollo-server/deployment/lambda/#running-locally. The error happens when I execute the invoke command using the query.json as described.
Looks like this is actually an issue with the documentation! I am working on updating the docs today but for now, here is the proper query.json
example.
{
"version": "2",
"httpMethod": "POST",
"path": "/",
"headers": {
"content-type": "application/json"
},
"requestContext": {},
"rawQueryString": "",
"body": "{\"operationName\": null, \"variables\": null, \"query\": \"{ hello }\"}"
}
Note that this version has the version
and rawQueryString
keys, both of which are required by our parser (and are always sent by lambda) but were missing in the example request.
I've set up the basic getting started example and installed the latest version (1.1.0) from NPM, but running the example returns the following:
If I downgrade "@as-integrations/aws-lambda" to version 1.0.1, I get the expected result:
So I guess there's something I need to set up differently when using the latest version – something not mentioned in the example guide. Or, there's a bug in the latest version. :)