apollo-server-express

  • Version 2.25.0
  • Published
  • 69.6 kB
  • 17 dependencies
  • MIT license

Install

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

Overview

Production-ready Node.js GraphQL server for Express and Connect

Index

Classes

class ApolloServer

class ApolloServer extends ApolloServerBase {}

    constructor

    constructor(config: ApolloServerExpressConfig);

      method applyMiddleware

      applyMiddleware: ({ app, ...rest }: ServerRegistration) => void;

        method createGraphQLServerOptions

        createGraphQLServerOptions: (req: any, res: any) => Promise<GraphQLOptions>;

          method getMiddleware

          getMiddleware: ({
          path,
          cors,
          bodyParserConfig,
          disableHealthCheck,
          onHealthCheck,
          }?: GetMiddlewareOptions) => any;

            method supportsSubscriptions

            protected supportsSubscriptions: () => boolean;

              method supportsUploads

              protected supportsUploads: () => boolean;

                Interfaces

                interface ApolloServerExpressConfig

                interface ApolloServerExpressConfig extends Config {}

                  property context

                  context?: ContextFunction<ExpressContext, Context> | Context;

                    interface ExpressContext

                    interface ExpressContext {}

                      property connection

                      connection?: ExecutionParams;

                        property req

                        req: express.Request;

                          property res

                          res: express.Response;

                            interface GetMiddlewareOptions

                            interface GetMiddlewareOptions {}

                              property bodyParserConfig

                              bodyParserConfig?: OptionsJson | boolean;

                                property cors

                                cors?: corsMiddleware.CorsOptions | corsMiddleware.CorsOptionsDelegate | boolean;

                                  property disableHealthCheck

                                  disableHealthCheck?: boolean;

                                    property onHealthCheck

                                    onHealthCheck?: (req: express.Request) => Promise<any>;

                                      property path

                                      path?: string;

                                        interface ServerRegistration

                                        interface ServerRegistration extends GetMiddlewareOptions {}

                                          property app

                                          app: express.Application;

                                            Package Files (2)

                                            Dependencies (17)

                                            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-express.

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