pub struct GraphqlConfig {
pub enabled: bool,
pub paths: Vec<String>,
pub max_depth: u32,
pub max_aliases: u32,
pub max_fields: u32,
pub max_directives: u32,
pub max_batch: u32,
pub block_introspection: bool,
}Expand description
GraphQL module configuration (Phase 11). Structural DoS/abuse caps applied to the
GraphQL operation(s) carried by a request (JSON query field, application/graphql
raw body, or GET ?query=). All counts come from the lexical [graphql_lex] pass.
Fields§
§enabled: boolDefault OFF (opt-in per deployment).
paths: Vec<String>Request paths treated as GraphQL endpoints (exact, case-insensitive). JSON and
GET transports are inspected ONLY on these paths (so a non-GraphQL JSON API with
a query field is not affected); application/graphql is recognized by its
Content-Type regardless of path.
max_depth: u32Max selection-set nesting depth (paren-aware).
max_aliases: u32Max alias count (alias: field) — the “alias bomb” cap.
max_fields: u32Max selection-name count (a cheap complexity proxy).
max_directives: u32Max @directive count.
max_batch: u32Max number of operations in one (batched) request.
block_introspection: boolBlock schema introspection (__schema/__type) → 403. Default off (policy).
Trait Implementations§
Source§impl Clone for GraphqlConfig
impl Clone for GraphqlConfig
Source§fn clone(&self) -> GraphqlConfig
fn clone(&self) -> GraphqlConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more