Struct juniper::RootNode
[−]
[src]
pub struct RootNode<'a, QueryT, MutationT> { /* fields omitted */ }
Root query node of a schema
This brings the mutation and query types together, and provides the predefined metadata fields.
Methods
impl<'a, QueryT, MutationT> RootNode<'a, QueryT, MutationT> where
QueryT: GraphQLType,
MutationT: GraphQLType,
[src]
QueryT: GraphQLType,
MutationT: GraphQLType,
fn new(
query_obj: QueryT,
mutation_obj: MutationT
) -> RootNode<'a, QueryT, MutationT>
query_obj: QueryT,
mutation_obj: MutationT
) -> RootNode<'a, QueryT, MutationT>
Construct a new root node from query and mutation nodes
If the schema should not support mutations, use the
new
constructor instead.
Trait Implementations
impl<'a, CtxT, QueryT, MutationT> GraphQLType for RootNode<'a, QueryT, MutationT> where
QueryT: GraphQLType<Context = CtxT>,
MutationT: GraphQLType<Context = CtxT>,
[src]
QueryT: GraphQLType<Context = CtxT>,
MutationT: GraphQLType<Context = CtxT>,
type Context = CtxT
The expected context type for this GraphQL type Read more
fn name() -> Option<&'static str>
The name of the GraphQL type to expose. Read more
fn meta<'r>(registry: &mut Registry<'r>) -> MetaType<'r>
The meta type representing this GraphQL type.
fn resolve_field(
&self,
field: &str,
args: &Arguments,
executor: &Executor<CtxT>
) -> ExecutionResult
&self,
field: &str,
args: &Arguments,
executor: &Executor<CtxT>
) -> ExecutionResult
Resolve the value of a single field on this type. Read more
fn resolve_into_type(
&self,
type_name: &str,
selection_set: Option<&[Selection]>,
executor: &Executor<Self::Context>
) -> ExecutionResult
&self,
type_name: &str,
selection_set: Option<&[Selection]>,
executor: &Executor<Self::Context>
) -> ExecutionResult
Resolve this interface or union into a concrete type Read more
fn concrete_type_name(&self, context: &Self::Context) -> String
Return the concrete type name for this instance/union. Read more
fn resolve(
&self,
selection_set: Option<&[Selection]>,
executor: &Executor<Self::Context>
) -> Value
&self,
selection_set: Option<&[Selection]>,
executor: &Executor<Self::Context>
) -> Value
Resolve the provided selection set against the current object. Read more