From 961275b7a8e9e9eb6174b9d7798a201b1616f035 Mon Sep 17 00:00:00 2001 From: Reyad Attiyat Date: Fri, 16 Dec 2016 23:41:32 -0600 Subject: [PATCH] Update README and Changelog Add example lambda handler and some documentation --- CHANGELOG.md | 1 + README.md | 13 ++++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d38dc279d45..b1bf2e717d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ ### v0.4.4 * 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 b7561c617df..5232355859c 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: