new GraphQLHandler()
Methods
graphiQLRequestHeaders(factory) → {GraphQLHandler}
Customize the HTTP headers to add to GraphQL requests sent by the GraphiQL user interface.
The result will be applied on top of the fixed set of headers specified in GraphiQLOptions.
This can be useful if, for example, the server is protected by authentication.
Parameters:
| Name | Type | Description |
|---|---|---|
factory |
function |
Returns:
a reference to this, so the API can be used fluently
- Type
- GraphQLHandler
handle(event)
Something has happened, so handle it.
Parameters:
| Name | Type | Description |
|---|---|---|
event |
RoutingContext | the event to handle |
queryContext(factory) → {GraphQLHandler}
Customize the query context object.
The provided
factory method will be invoked for each incoming GraphQL request.
Parameters:
| Name | Type | Description |
|---|---|---|
factory |
function |
Returns:
a reference to this, so the API can be used fluently
- Type
- GraphQLHandler