diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cf939e0020..079e5c6aa90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### VNEXT * Update GraphiQL to version 0.8.0 ([@DxCx](https://github.com/DxCx)) on [#192](https://github.com/apollostack/graphql-server/pull/192) * Upgrade to GraphQL-js 0.8.1. +* Add AWS Lambda Integration [#101](https://github.com/apollostack/graphql-server/issues/101) ### v0.4.2 diff --git a/README.md b/README.md index 580babd8248..be450257cb5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# GraphQL Server for Express, Connect, Hapi and Koa +# GraphQL Server for Express, Connect, Hapi, Koa and AWS Lambda [![npm version](https://badge.fury.io/js/graphql-server-core.svg)](https://badge.fury.io/js/graphql-server-core) [![Build Status](https://travis-ci.org/apollostack/graphql-server.svg?branch=master)](https://travis-ci.org/apollostack/graphql-server) @@ -31,6 +31,7 @@ where variant is one of the following: - express - koa - hapi + - lambda ### Express @@ -124,6 +125,16 @@ app.use(router.allowedMethods()); app.listen(PORT); ``` +### AWS Lambda + +Lambda function should be run with Node.js v4.3. Requires an API Gateway with Lambda Proxy Integration. + +```js +var server = require("graphql-server-lambda"); + +exports.handler = server.graphqlLambda({ schema: myGraphQLSchema }); +``` + ## Options GraphQL Server can be configured with an options object with the the following fields: