[][src]Struct juniper_rocket::GraphQLRequest

pub struct GraphQLRequest<S = DefaultScalarValue>(_)
where
    S: ScalarValue
;

Simple wrapper around an incoming GraphQL request

See the http module for more information. This type can be constructed automatically from both GET and POST routes by implementing the FromForm and FromData traits.

Methods

impl<S> GraphQLRequest<S> where
    S: ScalarValue,
    &'b S: ScalarRefValue<'b>, 
[src]

pub fn execute<CtxT, QueryT, MutationT>(
    &self,
    root_node: &RootNode<QueryT, MutationT, S>,
    context: &CtxT
) -> GraphQLResponse where
    QueryT: GraphQLType<S, Context = CtxT>,
    MutationT: GraphQLType<S, Context = CtxT>, 
[src]

Execute an incoming GraphQL query

pub fn operation_names(&self) -> Vec<Option<&str>>[src]

Returns the operation names associated with this request.

For batch requests there will be multiple names.

Trait Implementations

impl<S: Debug> Debug for GraphQLRequest<S> where
    S: ScalarValue
[src]

impl<S> FromDataSimple for GraphQLRequest<S> where
    S: ScalarValue
[src]

type Error = String

The associated error to be returned when the guard fails.

impl<'f, S> FromForm<'f> for GraphQLRequest<S> where
    S: ScalarValue
[src]

type Error = String

The associated error to be returned when parsing fails.

impl<'v, S> FromFormValue<'v> for GraphQLRequest<S> where
    S: ScalarValue
[src]

type Error = String

The associated error which can be returned from parsing. It is a good idea to have the return type be or contain an &'v str so that the unparseable string can be examined after a bad parse. Read more

impl<S: PartialEq> PartialEq<GraphQLRequest<S>> for GraphQLRequest<S> where
    S: ScalarValue
[src]

impl<S> StructuralPartialEq for GraphQLRequest<S> where
    S: ScalarValue
[src]

Auto Trait Implementations

impl<S> RefUnwindSafe for GraphQLRequest<S> where
    S: RefUnwindSafe

impl<S> Send for GraphQLRequest<S> where
    S: Send

impl<S> Sync for GraphQLRequest<S> where
    S: Sync

impl<S> Unpin for GraphQLRequest<S> where
    S: Unpin

impl<S> UnwindSafe for GraphQLRequest<S> where
    S: UnwindSafe

Blanket Implementations

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

impl<T, I> AsResult<T, I> for T where
    I: Input, 

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<'a, T> FromData<'a> for T where
    T: FromDataSimple
[src]

type Error = <T as FromDataSimple>::Error

The associated error to be returned when the guard fails.

type Owned = Data

The owned type returned from [FromData::transform()]. Read more

type Borrowed = Data

The borrowed type consumed by [FromData::from_data()] when [FromData::transform()] returns a [Transform::Borrowed]. Read more

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

impl<T> IntoCollection<T> for T

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<T> Typeable for T where
    T: Any