pub struct GraphQLConfig {Show 14 fields
pub enable_introspection: bool,
pub enable_playground: bool,
pub max_query_depth: Option<usize>,
pub max_query_complexity: Option<usize>,
pub validation_config: ValidationConfig,
pub enable_query_validation: bool,
pub distributed_cache_config: Option<CacheConfig>,
pub enable_sparql_field: bool,
pub sparql_query_timeout: Duration,
pub auto_generate_schema: bool,
pub max_request_body_size: usize,
pub request_read_timeout: Duration,
pub max_connections: usize,
pub rate_limit_config: Option<RateLimitConfig>,
}Expand description
GraphQL server configuration
Fields§
§enable_introspection: bool§enable_playground: bool§max_query_depth: Option<usize>§max_query_complexity: Option<usize>§validation_config: ValidationConfig§enable_query_validation: bool§distributed_cache_config: Option<CacheConfig>§enable_sparql_field: boolWhether the raw, unauthenticated SPARQL passthrough field
(sparql(query: String!): String) is exposed in the schema at all.
Disabled by default: it bypasses every GraphQL-level
depth/complexity limit and lets any client run arbitrary SPARQL
against the store, with no authentication or authorization of its
own. Only enable this on a deployment where the GraphQL endpoint
itself is already access-controlled.
sparql_query_timeout: DurationWall-clock timeout applied to each raw SPARQL passthrough query,
only relevant when enable_sparql_field is true.
auto_generate_schema: boolWhether to attempt automatic GraphQL schema generation from the
RDF store’s vocabulary (rdfs:Class/owl:Class definitions) in
addition to the built-in hello/version/triples/subjects/
predicates/objects fields. Falls back to the built-in fields
alone when the store has no discoverable vocabulary, or when
generation fails.
max_request_body_size: usizeMaximum accepted HTTP request body size, in bytes.
request_read_timeout: DurationIdle/read timeout applied to each socket read while parsing an HTTP request (Slowloris protection).
max_connections: usizeMaximum number of concurrent HTTP connections served.
rate_limit_config: Option<RateLimitConfig>Per-client-IP rate limiting configuration for incoming HTTP
requests. Disabled by default (None): set this to enforce a
request budget (token bucket / sliding window / fixed window /
adaptive-under-load) before any GraphQL parsing/execution happens.
See rate_limiting::RateLimiter.
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 moreSource§impl Debug for GraphQLConfig
impl Debug for GraphQLConfig
Auto Trait Implementations§
impl Freeze for GraphQLConfig
impl RefUnwindSafe for GraphQLConfig
impl Send for GraphQLConfig
impl Sync for GraphQLConfig
impl Unpin for GraphQLConfig
impl UnsafeUnpin for GraphQLConfig
impl UnwindSafe for GraphQLConfig
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more