[][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, 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]

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

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

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.