apollo-server-lambda

  • Version 2.25.1
  • Published
  • 55.7 kB
  • 6 dependencies
  • MIT license

Install

npm i apollo-server-lambda
yarn add apollo-server-lambda
pnpm add apollo-server-lambda

Overview

Production-ready Node.js GraphQL server for AWS Lambda

Index

Classes

class ApolloServer

class ApolloServer<
EventT extends APIGatewayProxyEventV1OrV2 = APIGatewayProxyEventV1OrV2
> extends ApolloServerBase {}

    method createGraphQLServerOptions

    createGraphQLServerOptions: (
    event: EventT,
    context: any
    ) => Promise<GraphQLOptions>;

      method createHandler

      createHandler: ({
      cors,
      onHealthCheck,
      }?: CreateHandlerOptions<EventT>) => (
      event: EventT,
      context: any,
      callback: import('aws-lambda').Callback<APIGatewayProxyResult> | undefined
      ) => void | Promise<APIGatewayProxyResult>;

        method serverlessFramework

        protected serverlessFramework: () => boolean;

          method supportsUploads

          protected supportsUploads: () => boolean;

            Interfaces

            interface CreateHandlerOptions

            interface CreateHandlerOptions<
            EventT extends APIGatewayProxyEventV1OrV2 = APIGatewayProxyEventV1OrV2
            > {}

              property cors

              cors?: {
              origin?: boolean | string | string[];
              methods?: string | string[];
              allowedHeaders?: string | string[];
              exposedHeaders?: string | string[];
              credentials?: boolean;
              maxAge?: number;
              };

                property onHealthCheck

                onHealthCheck?: (req: EventT) => Promise<any>;

                  property uploadsConfig

                  uploadsConfig?: FileUploadOptions;

                    Package Files (2)

                    Dependencies (6)

                    Dev Dependencies (1)

                    Peer Dependencies (1)

                    Badge

                    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/apollo-server-lambda.

                    • Markdown
                      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/apollo-server-lambda)
                    • HTML
                      <a href="https://www.jsdocs.io/package/apollo-server-lambda"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>