Currently my graphql project is working on :
"apollo-server-lambda": "^2.24.0",
"graphql": "^15.8.0",
And I m doing something like below in with my handler:
exports.graphqlHandler = (event, context, callback) => {
const callbackFilter = async (error, output) => {
// do something with error / output : like save them on aws s3 bucket
// or make an api call.
callback(error, output);
};
return server.createHandler()(event, context, callbackFilter);
}
this allow me intercept response / errors just before sending it to client.
Now my project requirement is to update apollo-server-lambda and graphql to latest version:
"apollo-server-lambda": "^^3.6.2",
"graphql": "^16.2.0",
but that above callbackFilter function stops working after the update. lambda does not invoke this callbackFilter function.
look like it just bypass callbackFilter. Everthing else works fine. I m able to hit my /gql end point and getting proper response.
but anything inside callbackFilter fn doesn’t execute .
Do I need to change something in my handler ?
Thanks