pub struct SchemaConfig {
pub exposed_schemas: Vec<String>,
pub enable_mutations: bool,
pub enable_subscriptions: bool,
pub query_prefix: Option<String>,
pub query_suffix: Option<String>,
pub use_camel_case: bool,
}Expand description
Configuration for schema generation.
Fields§
§exposed_schemas: Vec<String>Schemas to expose in GraphQL (e.g., [“public”])
enable_mutations: boolWhether to generate mutation types
enable_subscriptions: boolWhether to generate subscription types
query_prefix: Option<String>Prefix for query fields (e.g., “all” -> “allUsers”)
query_suffix: Option<String>Suffix for query fields (e.g., “Collection” -> “usersCollection”)
use_camel_case: boolWhether to use camelCase for field names
Implementations§
Source§impl SchemaConfig
impl SchemaConfig
Sourcepub fn with_schemas(self, schemas: Vec<String>) -> Self
pub fn with_schemas(self, schemas: Vec<String>) -> Self
Set the exposed schemas.
Sourcepub fn with_mutations(self, enable: bool) -> Self
pub fn with_mutations(self, enable: bool) -> Self
Enable or disable mutations.
Sourcepub fn with_subscriptions(self, enable: bool) -> Self
pub fn with_subscriptions(self, enable: bool) -> Self
Enable or disable subscriptions.
Sourcepub fn is_schema_exposed(&self, schema: &str) -> bool
pub fn is_schema_exposed(&self, schema: &str) -> bool
Check if a schema is exposed.
Trait Implementations§
Source§impl Clone for SchemaConfig
impl Clone for SchemaConfig
Source§fn clone(&self) -> SchemaConfig
fn clone(&self) -> SchemaConfig
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 SchemaConfig
impl Debug for SchemaConfig
Auto Trait Implementations§
impl Freeze for SchemaConfig
impl RefUnwindSafe for SchemaConfig
impl Send for SchemaConfig
impl Sync for SchemaConfig
impl Unpin for SchemaConfig
impl UnwindSafe for SchemaConfig
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
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>
Converts
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>
Converts
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