@webiny/api-wcp
TypeScript icon, indicating that this package has built-in type declarations

5.39.4 • Public • Published

@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

Example Description
Registering Plugins Shows 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(),
        // ...
    ]
});

Readme

Keywords

none

Package Sidebar

Install

npm i @webiny/api-wcp

Weekly Downloads

434

Version

5.39.4

License

MIT

Unpacked Size

43.9 kB

Total Files

21

Last publish

Collaborators

  • webiny