You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GraphQL server and client implementation for AWS Lambda with WebSocket (AWS API Gateway v2) and HTTP support (AWS API Gateway v1).
6
+
Use [Apollo Server Lambda](https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-lambda) with GraphQL subscriptions over WebSocket (AWS API Gateway v2).
7
7
8
-
The server is fully compatible with Apollo's [`subscriptions-transport-ws`](https://github.com/apollographql/subscriptions-transport-ws).
8
+
With this library you can do:
9
+
10
+
- same things as with [apollo-server-lambda](https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-lambda) by utiizing AWS API Gateway v1
11
+
- GraphQL subscriptions over WebSocket by utilizing AWS API Gateway v2 and [subscriptions-transport-ws](https://github.com/apollographql/subscriptions-transport-ws)
9
12
10
13
## Table of contents
11
14
@@ -17,60 +20,56 @@ The server is fully compatible with Apollo's [`subscriptions-transport-ws`](http
To implement WebSocket event handler and event stream handler please see the [example](https://github.com/michalkvasnicak/aws-lambda-graphql#1-websocket-server-handler).
28
-
29
-
To implement HTTP event handler please see the [example](https://github.com/michalkvasnicak/aws-lambda-graphql#11-http-server-handler).
30
+
There is a [quick start guide](https://github.com/michalkvasnicak/aws-lambda-graphql#quick-start).
-**waitForInitialization** (`optional`) - if connection is not initialised on GraphQL operation, wait for connection to be initialised or throw prohibited connection error. If `onConnect` is specified then we wait for initialisation otherwise we don't wait. (this is usefull if you're performing authentication in `onConnect`).
51
+
-**retryCount** (`number`, `optional`, `default 10`) - how many times should we try to check the connection state?
52
+
-**timeout** (`number`, `optional`, `default 50ms`) - how long should we wait (in milliseconds) until we try to check the connection state again?
43
53
44
-
### `createHttpHandler(options: Options): API Gateway v1 HTTP event handler function`
54
+
####`createHttpHandler()`
45
55
46
-
Creates an AWS API Gateway v1 event handler.
56
+
Creates an AWS Lambda API Gateway v1 handler. Events are handled by [apollo-server-lambda](https://github.com/apollographql/apollo-server/tree/master/packages/apollo-server-lambda)
-**validationRules** (`array of GraphQL validation rules`, `optional`)
71
-
-**waitForInitialization** (`optional`) - if connection is not initialised on GraphQL operation, wait for connection to be initialised or throw prohibited connection error. If `onConnect` is specified then we wait for initialisation otherwise we don't wait. (this is usefull if you're performing authentication in `onConnect`).
72
-
-**retryCount** (`number`, `optional`, `default 10`) - how many times should we try to check the connection state?
73
-
-**timeout** (`number`, `optional`, `default 50ms`) - how long should we wait (in milliseconds) until we try to check the connection state again?
0 commit comments