function
New
Register one GraphQL transport with secure defaults.
Example
Plugins:
[]ridu.Plugin{
graphql.New(graphql.Options{
Path: "/graphql",
MaxDepth: 12,
AllowIntrospection: false,
}),
}Arguments
| Argument | Type | Description |
|---|---|---|
options | []Options | The options value. |
Returns
The declared result.
ridu.PluginHow it works
Pass zero or one Options value; more than one is invalid. The plugin uses the same access, validation, hooks, transactions, and redaction engine as REST.
Full signature
func New(options ...Options) ridu.Plugin