GraphQL router.
(require("Router_GraphQL"))(app, baseRoute, options)
Create a GraphQL router.
Parameters:
Name | Type | Description |
---|---|---|
app |
* | |
baseRoute |
string | |
options |
objects |
- Source:
- routers/graphql.js
Properties:
Name | Type | Argument | Description |
---|---|---|---|
options.schema |
string | ||
options.middlewares |
object | array |
<optional> |
|
options.graphiql |
boolean |
<optional> |
Example
'<base path>': { graphql: { middlewares: {}, schema: 'graphql/schema', rootValue: '', graphiql: true } }