Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrMaxBatchSizeTooSmall = errors.New("maximum allowed batch size cannot be smaller than 1. Protection auto-disabled")
)
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Enabled bool `yaml:"enabled"` Max int `yaml:"max"` RejectOnFailure bool `yaml:"reject_on_failure"` }
func DefaultConfig ¶ added in v0.17.0
func DefaultConfig() Config
type MaxBatchRule ¶
type MaxBatchRule struct {
// contains filtered or unexported fields
}
func NewMaxBatch ¶
func NewMaxBatch(cfg Config) (*MaxBatchRule, error)
func (*MaxBatchRule) Validate ¶
func (t *MaxBatchRule) Validate(payload []gql.RequestData) error
Click to show internal directories.
Click to hide internal directories.