Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const handler = async (event: Object, context: Object) => {
if (!apolloHandler) {
const config = await createConfig();
const plugins = new PluginsContainer([
securityPlugins,
i18nPlugins,
pageBuilderPlugins(config),
mailchimpPlugins(config),
gtmPlugins(config),
cookiePolicyPlugins(config)
]);
const { handler } = await createHandler({ plugins, config });
apolloHandler = handler;
}
return apolloHandler(event, context);
};