[][src]Struct juniper::RootNode

pub struct RootNode<'a, QueryT: GraphQLType<S>, MutationT: GraphQLType<S>, S = DefaultScalarValue> where
    S: ScalarValue,
    &'b S: ScalarRefValue<'b>, 
{ /* 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, S> RootNode<'a, QueryT, MutationT, S> where
    S: ScalarValue + 'a,
    QueryT: GraphQLType<S, TypeInfo = ()>,
    MutationT: GraphQLType<S, TypeInfo = ()>,
    &'b S: ScalarRefValue<'b>, 
[src]

pub fn new(query_obj: QueryT, mutation_obj: MutationT) -> Self where
    &'b S: ScalarRefValue<'b>, 
[src]

Construct a new root node from query and mutation nodes

If the schema should not support mutations, use the new constructor instead.

impl<'a, S, QueryT, MutationT> RootNode<'a, QueryT, MutationT, S> where
    QueryT: GraphQLType<S>,
    MutationT: GraphQLType<S>,
    S: ScalarValue + 'a,
    &'b S: ScalarRefValue<'b>, 
[src]

pub fn new_with_info(
    query_obj: QueryT,
    mutation_obj: MutationT,
    query_info: QueryT::TypeInfo,
    mutation_info: MutationT::TypeInfo
) -> Self where
    &'b S: ScalarRefValue<'b>, 
[src]

Construct a new root node from query and mutation nodes, while also providing type info objects for the query and mutation types.

Trait Implementations

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>,
    &'b S: ScalarRefValue<'b>, 
[src]

type Context = CtxT

The expected context type for this GraphQL type Read more

type TypeInfo = QueryT::TypeInfo

Type that may carry additional schema information Read more

fn resolve_into_type(
    &self,
    info: &Self::TypeInfo,
    type_name: &str,
    selection_set: Option<&[Selection<S>]>,
    executor: &Executor<Self::Context, S>
) -> ExecutionResult<S>
[src]

Resolve this interface or union into a concrete type Read more

fn concrete_type_name(
    &self,
    context: &Self::Context,
    info: &Self::TypeInfo
) -> String
[src]

Return the concrete type name for this instance/union. Read more

impl<'a, QueryT: Debug + GraphQLType<S>, MutationT: Debug + GraphQLType<S>, S: Debug> Debug for RootNode<'a, QueryT, MutationT, S> where
    S: ScalarValue,
    &'b S: ScalarRefValue<'b>,
    QueryT::TypeInfo: Debug,
    MutationT::TypeInfo: Debug
[src]

Auto Trait Implementations

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

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]