apollo-server-express

  • Version 3.3.0
  • Published
  • 98.9 kB
  • 11 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

Index

Classes

class ApolloServer

class ApolloServer<
ContextFunctionParams = ExpressContext
> extends ApolloServerBase<ContextFunctionParams> {}

    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;

          Interfaces

          interface ExpressContext

          interface ExpressContext {}

            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;

                                Type Aliases

                                type ApolloServerExpressConfig

                                type ApolloServerExpressConfig = Config<ExpressContext>;

                                  Package Files (2)

                                  Dependencies (11)

                                  Dev Dependencies (1)

                                  Peer Dependencies (2)

                                  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>