[][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: PartialEq> PartialEq<GraphQLRequest<S>> for GraphQLRequest<S> where
    S: ScalarValue
[src]

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

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

fn default() -> Option<Self>[src]

Returns a default value to be used when the form field does not exist. If this returns None, then the field is required. Otherwise, this should return Some(default_value). The default implementation simply returns None. Read more

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<S> FromDataSimple for GraphQLRequest<S> where
    S: ScalarValue
[src]

type Error = String

The associated error to be returned when the guard fails.

Auto Trait Implementations

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

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

Blanket Implementations

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<T> BorrowMut<T> for T where
    T: ?Sized
[src]

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

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

impl<T> Typeable for T where
    T: Any

fn get_type(&self) -> TypeId

Get the TypeId of this object.

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> IntoCollection<T> for T

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