function

New

Register one GraphQL transport with secure defaults.

Example

go
Plugins:
[]ridu.Plugin{
  graphql.New(graphql.Options{
    Path:               "/graphql",
    MaxDepth:           12,
    AllowIntrospection: false,
  }),
}

Arguments

ArgumentTypeDescription
options[]OptionsThe options value.

Returns

The declared result.

ridu.Plugin

How 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

Related types

  • Options

    Route, request budgets, resource overrides, extensions, and validation rules.

  • Plugin

    The minimum compiled backend plugin contract.