New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@webiny/api-wcp

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webiny/api-wcp

A set of backend Webiny Control Panel (WCP)-related features.

5.41.4
Version published
Maintainers
0
Created

@webiny/api-wcp

code style: prettier PRs Welcome

A set of backend Webiny Control Panel (WCP)-related features.

Table of Contents

Installation

npm install --save @webiny/api-wcp

Or if you prefer yarn:

yarn add @webiny/api-wcp

Overview

The @webiny/api-wcp package contains essential backend Webiny Control Panel (WCP)-related utilities.

Examples

ExampleDescription
Registering PluginsShows how to register relevant plugins in a handler function.

Reference

Functions

createWcpContext
Type Declaration

export declare const createWcpContext: () => ContextPlugin<WcpContext>;

Creates the WCP context API.

import { createHandler } from "@webiny/handler-aws";
import { createWcpContext } from "@webiny/api-wcp";

export const handler = createHandler({
  plugins: [
    // Registers WCP context API.  
    createWcpContext(),
    // ...
  ]
});
createWcpGraphQL
Type Declaration

export declare const createWcpGraphQL: () => GraphQLSchemaPlugin<WcpContext>;

Returns WCP API URL. The default URL can be overridden via the WCP_API_URL environment variable.

import { createHandler } from "@webiny/handler-aws";
import { createWcpGraphQL } from "@webiny/api-wcp";

export const handler = createHandler({
    plugins: [
        // Registers WCP context API.  
        createWcpGraphQL(),
        // ...
    ]
});

FAQs

Package last updated on 30 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts