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