1 | import Koa, { Middleware } from 'koa';
|
2 | import corsMiddleware from '@koa/cors';
|
3 | import bodyParser from 'koa-bodyparser';
|
4 | import { ApolloServerBase, GraphQLOptions } from 'apollo-server-core';
|
5 | export { GraphQLOptions, GraphQLExtension } from 'apollo-server-core';
|
6 | export interface GetMiddlewareOptions {
|
7 | path?: string;
|
8 | cors?: corsMiddleware.Options | boolean;
|
9 | bodyParserConfig?: bodyParser.Options | boolean;
|
10 | onHealthCheck?: (ctx: Koa.Context) => Promise<any>;
|
11 | disableHealthCheck?: boolean;
|
12 | }
|
13 | export interface ServerRegistration extends GetMiddlewareOptions {
|
14 | app: Koa;
|
15 | }
|
16 | export declare class ApolloServer extends ApolloServerBase {
|
17 | createGraphQLServerOptions(ctx: Koa.Context): Promise<GraphQLOptions>;
|
18 | protected supportsSubscriptions(): boolean;
|
19 | protected supportsUploads(): boolean;
|
20 | applyMiddleware({ app, ...rest }: ServerRegistration): void;
|
21 | getMiddleware({ path, cors, bodyParserConfig, disableHealthCheck, onHealthCheck, }?: GetMiddlewareOptions): Middleware;
|
22 | }
|
23 |
|
\ | No newline at end of file |