Closed Lucifer0x17 closed 1 year ago
Apologies for a messed up screenshot. Here is a better view
I found that updating my query.json
file to below did the trick. (requestContext
)
{
"version": "1",
"httpMethod": "POST",
"path": "/",
"headers": {
"content-type": "application/json"
},
"requestContext": { "http": { "method": "POST" } },
"rawQueryString": "",
"body": "{\"operationName\": null, \"variables\": null, \"query\": \"{ hello }\"}"
}
I believe the issue lies in https://github.com/apollo-server-integrations/apollo-server-integration-aws-lambda/blob/main/src/request-handlers/APIGatewayProxyEventV2RequestHandler.ts#L14
And perhaps the documentation needs to be updated in https://github.com/apollographql/apollo-server/pull/7291/files
FYI a PR is opened for this issue on @as-integrations/aws-lambda
https://github.com/apollographql/apollo-server/issues/7327#issuecomment-1405083773
Ohh okay. Thank you so much. I will close the issue then. Thanks.
I am getting the response if I am using createAPIGatewayProxyEventRequestHandler() handler but if I am using V2 handler I am getting statusCode of 400