Hi I'm currently using apollo-server-lambda is there any way I can add custom response headers?
TIA
closing this as I found the solution.
exports.graphqlHandler = (event, context, callback) => {
const callbackFilter = (error, output) => {
const customOutput = output;
customOutput.headers['x-custom-header-response'] = 'value here';
callback(error, customOutput);
};
return server.createHandler()(event, context, callbackFilter);
};
Most helpful comment
closing this as I found the solution.