pub struct GraphQlConfig {
pub endpoint: String,
pub graphiql_endpoint: Option<String>,
pub max_request_bytes: usize,
}Expand description
GraphQL Configuration
Configuration options for the GraphQL endpoint.
§Fields
endpoint: The URL path for the GraphQL API (default: “/graphql”)graphiql_endpoint: Optional path for GraphiQL interfacemax_request_bytes: Maximum request body size (default: 1MB)
Fields§
§endpoint: String§graphiql_endpoint: Option<String>§max_request_bytes: usizeImplementations§
Source§impl GraphQlConfig
impl GraphQlConfig
Sourcepub fn with_graphiql(self, path: impl Into<String>) -> Self
pub fn with_graphiql(self, path: impl Into<String>) -> Self
Enables GraphiQL at the specified path.
Sourcepub fn without_graphiql(self) -> Self
pub fn without_graphiql(self) -> Self
Disables the GraphiQL interface.
Sourcepub fn with_max_request_bytes(self, bytes: usize) -> Self
pub fn with_max_request_bytes(self, bytes: usize) -> Self
Sets the maximum request body size in bytes.
Trait Implementations§
Source§impl Clone for GraphQlConfig
impl Clone for GraphQlConfig
Source§fn clone(&self) -> GraphQlConfig
fn clone(&self) -> GraphQlConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
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<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
Mutably borrows from an owned value. Read more