pub struct QueryField {
pub name: String,
pub table_name: String,
pub return_type: String,
pub is_list: bool,
pub is_by_pk: bool,
pub description: Option<String>,
}Expand description
A query field for a table (e.g., users, userByPk).
Fields§
§name: StringField name (e.g., “users”)
table_name: StringTable name
return_type: StringGraphQL return type
is_list: boolWhether this returns a list
is_by_pk: boolWhether this is a “by PK” query
description: Option<String>Field description
Implementations§
Source§impl QueryField
impl QueryField
Sourcepub fn list(table: &Table, config: &SchemaConfig) -> Self
pub fn list(table: &Table, config: &SchemaConfig) -> Self
Create a list query field (e.g., users).
Sourcepub fn by_pk(table: &Table, config: &SchemaConfig) -> Option<Self>
pub fn by_pk(table: &Table, config: &SchemaConfig) -> Option<Self>
Create a by-PK query field (e.g., userByPk).
Trait Implementations§
Source§impl Clone for QueryField
impl Clone for QueryField
Source§fn clone(&self) -> QueryField
fn clone(&self) -> QueryField
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 QueryField
impl RefUnwindSafe for QueryField
impl Send for QueryField
impl Sync for QueryField
impl Unpin for QueryField
impl UnwindSafe for QueryField
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