UNPKG

@fanoutio/apollo-server-lambda-grip

Version:

Apollo Server that runs on AWS Lambda API Gateway and GRIP to pump subscriptions

19 lines (18 loc) 637 B
/// <reference types="node" /> import http from "http"; import { APIGatewayProxyEvent, APIGatewayProxyResult } from "aws-lambda"; interface GatewayEventRequest extends http.IncomingMessage { body: string; } interface GatewayEventResponse extends http.ServerResponse { getHeadersAsObject?: () => { [key: string]: string; }; getBodyAsBuffer?: () => Buffer; } export declare function httpFromApiGatewayEvent(event: APIGatewayProxyEvent): { req: GatewayEventRequest; res: GatewayEventResponse; }; export declare function apiGatewayResponseFromHttp(res: http.ServerResponse): APIGatewayProxyResult; export {};