Update README and Changelog

Add example lambda handler and some documentation
This commit is contained in:
Reyad Attiyat 2016-12-16 23:41:32 -06:00
parent 236dc25622
commit e5f69548de
2 changed files with 15 additions and 1 deletions

View file

@ -3,6 +3,7 @@
### VNEXT
* Restify: Fix for calling next() (([@jadkap](https://github.com/jadkap)) on [#285](https://github.com/apollostack/graphql-server/pull/285))
* Add AWS Lambda Integration [#101](https://github.com/apollostack/graphql-server/issues/101)
### v0.5.2
* **Restify integration** ([@joelgriffith](https://github.com/joelgriffith)) on [#189](https://github.com/apollostack/graphql-server/pull/189)

View file

@ -1,4 +1,4 @@
# GraphQL Server for Express, Connect, Hapi, Koa, and Restify
# GraphQL Server for Express, Connect, Hapi, Koa, Restify 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
@ -153,8 +154,20 @@ server.get('/graphiql', graphiqlRestify({ endpointURL: '/graphql' }));
server.listen(PORT, () => console.log(`Listening on ${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:
* **schema**: the GraphQLSchema to be used