JSPM

@webiny/api-wcp

5.31.0-beta.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 128
  • Score
    100M100P100Q128866F
  • License MIT

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

Package Exports

  • @webiny/api-wcp
  • @webiny/api-wcp/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@webiny/api-wcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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(),
        // ...
    ]
});