pub struct Roots {
pub query: Option<String>,
pub mutation: Option<String>,
pub subscription: Option<String>,
}Expand description
The root operation type names (Query / Mutation / Subscription), used to classify a type’s fields as root operations vs. plain object fields. Shared by the SDL and introspection loaders so that one rule lives in one place; each loader fills in whichever roots its source declares.
Fields§
§query: Option<String>§mutation: Option<String>§subscription: Option<String>Implementations§
Source§impl Roots
impl Roots
Sourcepub fn field_kind(&self, type_name: &str) -> Kind
pub fn field_kind(&self, type_name: &str) -> Kind
The Kind for a field defined on type_name: a root-operation kind if
type_name is a root type, otherwise a plain object Kind::Field.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Roots
impl RefUnwindSafe for Roots
impl Send for Roots
impl Sync for Roots
impl Unpin for Roots
impl UnsafeUnpin for Roots
impl UnwindSafe for Roots
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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