pub struct GeneratedSchema {
pub object_types: HashMap<String, TableObjectType>,
pub query_fields: Vec<QueryField>,
pub mutation_fields: Vec<MutationField>,
pub relationship_fields: HashMap<String, Vec<RelationshipField>>,
}Expand description
Represents a generated GraphQL schema.
Fields§
§object_types: HashMap<String, TableObjectType>Object types for each table
query_fields: Vec<QueryField>Query fields
mutation_fields: Vec<MutationField>Mutation fields (if enabled)
relationship_fields: HashMap<String, Vec<RelationshipField>>Relationship fields for each type
Implementations§
Source§impl GeneratedSchema
impl GeneratedSchema
Sourcepub fn get_object_type(&self, name: &str) -> Option<&TableObjectType>
pub fn get_object_type(&self, name: &str) -> Option<&TableObjectType>
Get an object type by name.
Sourcepub fn get_query_field(&self, table_name: &str) -> Option<&QueryField>
pub fn get_query_field(&self, table_name: &str) -> Option<&QueryField>
Get query fields for a table.
Sourcepub fn get_mutation_fields(&self, table_name: &str) -> Vec<&MutationField>
pub fn get_mutation_fields(&self, table_name: &str) -> Vec<&MutationField>
Get mutation fields for a table.
Sourcepub fn get_relationship_fields(
&self,
type_name: &str,
) -> Option<&Vec<RelationshipField>>
pub fn get_relationship_fields( &self, type_name: &str, ) -> Option<&Vec<RelationshipField>>
Get relationship fields for a type.
Sourcepub fn table_names(&self) -> Vec<&str>
pub fn table_names(&self) -> Vec<&str>
Get all table names.
Sourcepub fn type_names(&self) -> Vec<&str>
pub fn type_names(&self) -> Vec<&str>
Get all type names.
Trait Implementations§
Source§impl Clone for GeneratedSchema
impl Clone for GeneratedSchema
Source§fn clone(&self) -> GeneratedSchema
fn clone(&self) -> GeneratedSchema
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 moreAuto Trait Implementations§
impl Freeze for GeneratedSchema
impl RefUnwindSafe for GeneratedSchema
impl Send for GeneratedSchema
impl Sync for GeneratedSchema
impl Unpin for GeneratedSchema
impl UnwindSafe for GeneratedSchema
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