pub struct RootNode<'a, QueryT: GraphQLType<S>, MutationT: GraphQLType<S>, S = DefaultScalarValue>where
S: ScalarValue,
for<'b> &'b S: ScalarRefValue<'b>,{ /* private fields */ }
Expand description
Root query node of a schema
This brings the mutation and query types together, and provides the predefined metadata fields.
Implementations
sourceimpl<'a, QueryT, MutationT, S> RootNode<'a, QueryT, MutationT, S>where
S: ScalarValue + 'a,
QueryT: GraphQLType<S, TypeInfo = ()>,
MutationT: GraphQLType<S, TypeInfo = ()>,
for<'b> &'b S: ScalarRefValue<'b>,
impl<'a, QueryT, MutationT, S> RootNode<'a, QueryT, MutationT, S>where
S: ScalarValue + 'a,
QueryT: GraphQLType<S, TypeInfo = ()>,
MutationT: GraphQLType<S, TypeInfo = ()>,
for<'b> &'b S: ScalarRefValue<'b>,
sourcepub fn new(query_obj: QueryT, mutation_obj: MutationT) -> Selfwhere
for<'b> &'b S: ScalarRefValue<'b>,
pub fn new(query_obj: QueryT, mutation_obj: MutationT) -> Selfwhere
for<'b> &'b S: ScalarRefValue<'b>,
Construct a new root node from query and mutation nodes
If the schema should not support mutations, use the
new
constructor instead.
sourceimpl<'a, S, QueryT, MutationT> RootNode<'a, QueryT, MutationT, S>where
QueryT: GraphQLType<S>,
MutationT: GraphQLType<S>,
S: ScalarValue + 'a,
for<'b> &'b S: ScalarRefValue<'b>,
impl<'a, S, QueryT, MutationT> RootNode<'a, QueryT, MutationT, S>where
QueryT: GraphQLType<S>,
MutationT: GraphQLType<S>,
S: ScalarValue + 'a,
for<'b> &'b S: ScalarRefValue<'b>,
sourcepub fn new_with_info(
query_obj: QueryT,
mutation_obj: MutationT,
query_info: QueryT::TypeInfo,
mutation_info: MutationT::TypeInfo
) -> Selfwhere
for<'b> &'b S: ScalarRefValue<'b>,
pub fn new_with_info(
query_obj: QueryT,
mutation_obj: MutationT,
query_info: QueryT::TypeInfo,
mutation_info: MutationT::TypeInfo
) -> Selfwhere
for<'b> &'b S: ScalarRefValue<'b>,
Construct a new root node from query and mutation nodes, while also providing type info objects for the query and mutation types.
Trait Implementations
sourceimpl<'a, QueryT: Debug + GraphQLType<S>, MutationT: Debug + GraphQLType<S>, S: Debug> Debug for RootNode<'a, QueryT, MutationT, S>where
S: ScalarValue,
for<'b> &'b S: ScalarRefValue<'b>,
QueryT::TypeInfo: Debug,
MutationT::TypeInfo: Debug,
impl<'a, QueryT: Debug + GraphQLType<S>, MutationT: Debug + GraphQLType<S>, S: Debug> Debug for RootNode<'a, QueryT, MutationT, S>where
S: ScalarValue,
for<'b> &'b S: ScalarRefValue<'b>,
QueryT::TypeInfo: Debug,
MutationT::TypeInfo: Debug,
sourceimpl<'a, CtxT, S, QueryT, MutationT> GraphQLType<S> for RootNode<'a, QueryT, MutationT, S>where
S: ScalarValue,
QueryT: GraphQLType<S, Context = CtxT>,
MutationT: GraphQLType<S, Context = CtxT>,
for<'b> &'b S: ScalarRefValue<'b>,
impl<'a, CtxT, S, QueryT, MutationT> GraphQLType<S> for RootNode<'a, QueryT, MutationT, S>where
S: ScalarValue,
QueryT: GraphQLType<S, Context = CtxT>,
MutationT: GraphQLType<S, Context = CtxT>,
for<'b> &'b S: ScalarRefValue<'b>,
type TypeInfo = <QueryT as GraphQLType<S>>::TypeInfo
type TypeInfo = <QueryT as GraphQLType<S>>::TypeInfo
Type that may carry additional schema information Read more
sourcefn name(info: &QueryT::TypeInfo) -> Option<&str>
fn name(info: &QueryT::TypeInfo) -> Option<&str>
The name of the GraphQL type to expose. Read more
sourcefn meta<'r>(
info: &QueryT::TypeInfo,
registry: &mut Registry<'r, S>
) -> MetaType<'r, S>where
S: 'r,
for<'b> &'b S: ScalarRefValue<'b>,
fn meta<'r>(
info: &QueryT::TypeInfo,
registry: &mut Registry<'r, S>
) -> MetaType<'r, S>where
S: 'r,
for<'b> &'b S: ScalarRefValue<'b>,
The meta type representing this GraphQL type.
sourcefn resolve_field(
&self,
info: &QueryT::TypeInfo,
field: &str,
args: &Arguments<'_, S>,
executor: &Executor<'_, CtxT, S>
) -> ExecutionResult<S>
fn resolve_field(
&self,
info: &QueryT::TypeInfo,
field: &str,
args: &Arguments<'_, S>,
executor: &Executor<'_, CtxT, S>
) -> ExecutionResult<S>
Resolve the value of a single field on this type. Read more
sourcefn resolve(
&self,
info: &Self::TypeInfo,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> Value<S>
fn resolve(
&self,
info: &Self::TypeInfo,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> Value<S>
Resolve the provided selection set against the current object. Read more
sourcefn resolve_into_type(
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
fn resolve_into_type(
&self,
info: &Self::TypeInfo,
type_name: &str,
selection_set: Option<&[Selection<'_, S>]>,
executor: &Executor<'_, Self::Context, S>
) -> ExecutionResult<S>
Resolve this interface or union into a concrete type Read more
Auto Trait Implementations
impl<'a, QueryT, MutationT, S> RefUnwindSafe for RootNode<'a, QueryT, MutationT, S>where
MutationT: RefUnwindSafe,
QueryT: RefUnwindSafe,
S: RefUnwindSafe,
<MutationT as GraphQLType<S>>::TypeInfo: RefUnwindSafe,
<QueryT as GraphQLType<S>>::TypeInfo: RefUnwindSafe,
impl<'a, QueryT, MutationT, S> Send for RootNode<'a, QueryT, MutationT, S>where
MutationT: Send,
QueryT: Send,
S: Send,
<MutationT as GraphQLType<S>>::TypeInfo: Send,
<QueryT as GraphQLType<S>>::TypeInfo: Send,
impl<'a, QueryT, MutationT, S> Sync for RootNode<'a, QueryT, MutationT, S>where
MutationT: Sync,
QueryT: Sync,
S: Sync,
<MutationT as GraphQLType<S>>::TypeInfo: Sync,
<QueryT as GraphQLType<S>>::TypeInfo: Sync,
impl<'a, QueryT, MutationT, S> Unpin for RootNode<'a, QueryT, MutationT, S>where
MutationT: Unpin,
QueryT: Unpin,
S: Unpin,
<MutationT as GraphQLType<S>>::TypeInfo: Unpin,
<QueryT as GraphQLType<S>>::TypeInfo: Unpin,
impl<'a, QueryT, MutationT, S> UnwindSafe for RootNode<'a, QueryT, MutationT, S>where
MutationT: UnwindSafe,
QueryT: UnwindSafe,
S: UnwindSafe,
<MutationT as GraphQLType<S>>::TypeInfo: UnwindSafe,
<QueryT as GraphQLType<S>>::TypeInfo: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more