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