UNPKG

1.26 kBTypeScriptView Raw
1/// <reference types="node" />
2import { APIGatewayProxyCallback, APIGatewayProxyEvent, Context as LambdaContext } from 'aws-lambda';
3import { FileUploadOptions, ApolloServerBase, GraphQLOptions } from 'apollo-server-core';
4import { IncomingHttpHeaders } from 'http';
5import { Readable } from 'stream';
6export interface CreateHandlerOptions {
7 cors?: {
8 origin?: boolean | string | string[];
9 methods?: string | string[];
10 allowedHeaders?: string | string[];
11 exposedHeaders?: string | string[];
12 credentials?: boolean;
13 maxAge?: number;
14 };
15 uploadsConfig?: FileUploadOptions;
16 onHealthCheck?: (req: APIGatewayProxyEvent) => Promise<any>;
17}
18export declare class FileUploadRequest extends Readable {
19 headers: IncomingHttpHeaders;
20}
21export declare class ApolloServer extends ApolloServerBase {
22 protected serverlessFramework(): boolean;
23 protected supportsUploads(): boolean;
24 createGraphQLServerOptions(event: APIGatewayProxyEvent, context: LambdaContext): Promise<GraphQLOptions>;
25 createHandler({ cors, onHealthCheck }?: CreateHandlerOptions): (event: APIGatewayProxyEvent, context: LambdaContext, callback: APIGatewayProxyCallback) => void;
26}
27//# sourceMappingURL=ApolloServer.d.ts.map
\No newline at end of file