How to use the @webiny/api-page-builder/plugins function in @webiny/api-page-builder

To help you get started, we’ve selected a few @webiny/api-page-builder examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github webiny / webiny-js / examples / functions / code / api-service-page-builder / src / handler.js View on Github external
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);
};

@webiny/api-page-builder

The API for the Webiny Page Builder (webiny-app-page-builder) app.

MIT
Latest version published 8 days ago

Package Health Score

75 / 100
Full package analysis

Similar packages