pub struct HandlerGraphqlConfig {
pub enabled: bool,
pub max_depth: Option<u32>,
pub max_complexity: Option<u32>,
pub introspection: Option<bool>,
pub persisted_queries: bool,
pub safelist: bool,
pub federated: bool,
pub graphiql: bool,
pub data: Option<HandlerGraphqlDataConfig>,
}Expand description
Per-site GraphQL edge query-guard tuning (see HandlersSiteConfig::graphql).
Fields§
§enabled: boolMaster switch. false (the default) ⇒ the guard is inert even if present.
max_depth: Option<u32>Deepest allowed selection-set nesting (fragments expanded). None ⇒ the
server default.
max_complexity: Option<u32>Largest allowed total field count (a schema-free complexity proxy). None ⇒
the server default.
introspection: Option<bool>Whether a schema-introspection query is allowed. None ⇒ the posture default
(off under the multi-tenant posture, on for single-tenant).
persisted_queries: boolAutomatic Persisted Queries: clients may send a query hash
(extensions.persistedQuery.sha256Hash) instead of the full query; the edge
resolves + caches hash → query (saving bandwidth + parse cost).
safelist: boolSafelist mode: only pre-registered query hashes run (a query allowlist); the edge
never registers a new query. Implies (and is stronger than) persisted_queries.
federated: boolFederation gateway: this site is a supergraph gateway. A GraphQL query is planned against the project’s registered subgraphs and executed by dispatching fetches to the subgraph functions (a subgraph’s name is its function name), stitching the results — instead of running a single handler component.
graphiql: boolServe the GraphiQL in-browser explorer: a browser GET (an Accept: text/html
request) to the endpoint gets the IDE, which posts queries back to the same URL.
A developer convenience — off by default; pair with introspection for schema docs.
data: Option<HandlerGraphqlDataConfig>Declarative data connector: serve the GraphQL API by generating it from a managed database (queries compiled to SQL) instead of running a wasm handler. Absent unless configured; exposure is deny-by-default.
Trait Implementations§
Source§impl Clone for HandlerGraphqlConfig
impl Clone for HandlerGraphqlConfig
Source§fn clone(&self) -> HandlerGraphqlConfig
fn clone(&self) -> HandlerGraphqlConfig
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 HandlerGraphqlConfig
impl Debug for HandlerGraphqlConfig
Source§impl Default for HandlerGraphqlConfig
impl Default for HandlerGraphqlConfig
Source§fn default() -> HandlerGraphqlConfig
fn default() -> HandlerGraphqlConfig
Source§impl<'de> Deserialize<'de> for HandlerGraphqlConfigwhere
HandlerGraphqlConfig: Default,
impl<'de> Deserialize<'de> for HandlerGraphqlConfigwhere
HandlerGraphqlConfig: Default,
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<HandlerGraphqlConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<HandlerGraphqlConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for HandlerGraphqlConfig
Source§impl PartialEq for HandlerGraphqlConfig
impl PartialEq for HandlerGraphqlConfig
Source§impl Serialize for HandlerGraphqlConfig
impl Serialize for HandlerGraphqlConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for HandlerGraphqlConfig
Auto Trait Implementations§
impl Freeze for HandlerGraphqlConfig
impl RefUnwindSafe for HandlerGraphqlConfig
impl Send for HandlerGraphqlConfig
impl Sync for HandlerGraphqlConfig
impl Unpin for HandlerGraphqlConfig
impl UnsafeUnpin for HandlerGraphqlConfig
impl UnwindSafe for HandlerGraphqlConfig
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.