[][src]Struct juniper::RootNode

pub struct RootNode<'a, QueryT: GraphQLType<S>, MutationT: GraphQLType<S>, SubscriptionT: GraphQLType<S>, S = DefaultScalarValue> where
    S: ScalarValue
{ /* fields omitted */ }

Root query node of a schema

This brings the mutation, subscription and query types together, and provides the predefined metadata fields.

Implementations

impl<'a, QueryT, MutationT, SubscriptionT> RootNode<'a, QueryT, MutationT, SubscriptionT, DefaultScalarValue> where
    QueryT: GraphQLType<DefaultScalarValue, TypeInfo = ()>,
    MutationT: GraphQLType<DefaultScalarValue, TypeInfo = ()>,
    SubscriptionT: GraphQLType<DefaultScalarValue, TypeInfo = ()>, 
[src]

pub fn new(
    query: QueryT,
    mutation: MutationT,
    subscription: SubscriptionT
) -> Self
[src]

Constructs a new RootNode from query, mutation and subscription nodes, parametrizing it with a DefaultScalarValue.

impl<'a, QueryT, MutationT, SubscriptionT, S> RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    S: ScalarValue + 'a,
    QueryT: GraphQLType<S, TypeInfo = ()>,
    MutationT: GraphQLType<S, TypeInfo = ()>,
    SubscriptionT: GraphQLType<S, TypeInfo = ()>, 
[src]

pub fn new_with_scalar_value(
    query: QueryT,
    mutation: MutationT,
    subscription: SubscriptionT
) -> Self
[src]

Constructs a new RootNode from query, mutation and subscription nodes, parametrizing it with the provided ScalarValue.

pub fn as_schema_language(&self) -> String[src]

The schema definition as a String in the GraphQL Schema Language format.

pub fn as_parser_document(&'a self) -> Document<'a, &'a str>[src]

The schema definition as a graphql_parser Document.

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

pub fn new_with_info(
    query_obj: QueryT,
    mutation_obj: MutationT,
    subscription_obj: SubscriptionT,
    query_info: QueryT::TypeInfo,
    mutation_info: MutationT::TypeInfo,
    subscription_info: SubscriptionT::TypeInfo
) -> Self
[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>, SubscriptionT: Debug + GraphQLType<S>, S: Debug> Debug for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    S: ScalarValue,
    QueryT::TypeInfo: Debug,
    MutationT::TypeInfo: Debug,
    SubscriptionT::TypeInfo: Debug
[src]

impl<'a, S, QueryT, MutationT, SubscriptionT> GraphQLType<S> for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    S: ScalarValue,
    QueryT: GraphQLType<S>,
    MutationT: GraphQLType<S, Context = QueryT::Context>,
    SubscriptionT: GraphQLType<S, Context = QueryT::Context>, 
[src]

impl<'a, S, QueryT, MutationT, SubscriptionT> GraphQLValue<S> for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    S: ScalarValue,
    QueryT: GraphQLType<S>,
    MutationT: GraphQLType<S, Context = QueryT::Context>,
    SubscriptionT: GraphQLType<S, Context = QueryT::Context>, 
[src]

type Context = QueryT::Context

Context type for this GraphQLValue. Read more

type TypeInfo = QueryT::TypeInfo

Type that may carry additional schema information for this GraphQLValue. Read more

impl<'a, S, QueryT, MutationT, SubscriptionT> GraphQLValueAsync<S> for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    QueryT: GraphQLTypeAsync<S>,
    QueryT::TypeInfo: Sync,
    QueryT::Context: Sync + 'a,
    MutationT: GraphQLTypeAsync<S, Context = QueryT::Context>,
    MutationT::TypeInfo: Sync,
    SubscriptionT: GraphQLType<S, Context = QueryT::Context> + Sync,
    SubscriptionT::TypeInfo: Sync,
    S: ScalarValue + Send + Sync
[src]

Auto Trait Implementations

impl<'a, QueryT, MutationT, SubscriptionT, S> RefUnwindSafe for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    MutationT: RefUnwindSafe,
    QueryT: RefUnwindSafe,
    S: RefUnwindSafe,
    SubscriptionT: RefUnwindSafe,
    <MutationT as GraphQLValue<S>>::TypeInfo: RefUnwindSafe,
    <QueryT as GraphQLValue<S>>::TypeInfo: RefUnwindSafe,
    <SubscriptionT as GraphQLValue<S>>::TypeInfo: RefUnwindSafe
[src]

impl<'a, QueryT, MutationT, SubscriptionT, S> Send for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    MutationT: Send,
    QueryT: Send,
    S: Send,
    SubscriptionT: Send,
    <MutationT as GraphQLValue<S>>::TypeInfo: Send,
    <QueryT as GraphQLValue<S>>::TypeInfo: Send,
    <SubscriptionT as GraphQLValue<S>>::TypeInfo: Send
[src]

impl<'a, QueryT, MutationT, SubscriptionT, S> Sync for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    MutationT: Sync,
    QueryT: Sync,
    S: Sync,
    SubscriptionT: Sync,
    <MutationT as GraphQLValue<S>>::TypeInfo: Sync,
    <QueryT as GraphQLValue<S>>::TypeInfo: Sync,
    <SubscriptionT as GraphQLValue<S>>::TypeInfo: Sync
[src]

impl<'a, QueryT, MutationT, SubscriptionT, S> Unpin for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    MutationT: Unpin,
    QueryT: Unpin,
    S: Unpin,
    SubscriptionT: Unpin,
    <MutationT as GraphQLValue<S>>::TypeInfo: Unpin,
    <QueryT as GraphQLValue<S>>::TypeInfo: Unpin,
    <SubscriptionT as GraphQLValue<S>>::TypeInfo: Unpin
[src]

impl<'a, QueryT, MutationT, SubscriptionT, S> UnwindSafe for RootNode<'a, QueryT, MutationT, SubscriptionT, S> where
    MutationT: UnwindSafe,
    QueryT: UnwindSafe,
    S: UnwindSafe,
    SubscriptionT: UnwindSafe,
    <MutationT as GraphQLValue<S>>::TypeInfo: UnwindSafe,
    <QueryT as GraphQLValue<S>>::TypeInfo: UnwindSafe,
    <SubscriptionT as GraphQLValue<S>>::TypeInfo: UnwindSafe
[src]

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,