[−][src]Struct juniper_rocket::GraphQLRequest
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]
S: ScalarValue,
&'b S: ScalarRefValue<'b>,
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]
&self,
root_node: &RootNode<QueryT, MutationT, S>,
context: &CtxT
) -> GraphQLResponse where
QueryT: GraphQLType<S, Context = CtxT>,
MutationT: GraphQLType<S, Context = CtxT>,
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]
S: ScalarValue,
fn eq(&self, other: &GraphQLRequest<S>) -> bool
[src]
fn ne(&self, other: &GraphQLRequest<S>) -> bool
[src]
impl<S: Debug> Debug for GraphQLRequest<S> where
S: ScalarValue,
[src]
S: ScalarValue,
impl<'v, S> FromFormValue<'v> for GraphQLRequest<S> where
S: ScalarValue,
[src]
S: ScalarValue,
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 from_form_value(form_value: &'v RawStr) -> Result<Self, Self::Error>
[src]
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]
S: ScalarValue,
type Error = String
The associated error to be returned when parsing fails.
fn from_form(
form_items: &mut FormItems<'f>,
strict: bool
) -> Result<Self, String>
[src]
form_items: &mut FormItems<'f>,
strict: bool
) -> Result<Self, String>
impl<S> FromDataSimple for GraphQLRequest<S> where
S: ScalarValue,
[src]
S: ScalarValue,
Auto Trait Implementations
impl<S> Send for GraphQLRequest<S> where
S: Send,
S: Send,
impl<S> Sync for GraphQLRequest<S> where
S: Sync,
S: Sync,
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<'a, T> FromData<'a> for T where
T: FromDataSimple,
[src]
T: FromDataSimple,
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
fn transform(
&Request,
d: Data
) -> Transform<Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>, Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>>
[src]
&Request,
d: Data
) -> Transform<Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>, Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>>
fn from_data(
req: &Request,
o: Transform<Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>, Outcome<&'a <T as FromData<'a>>::Borrowed, (Status, <T as FromData<'a>>::Error), Data>>
) -> Outcome<T, (Status, <T as FromData<'a>>::Error), Data>
[src]
req: &Request,
o: Transform<Outcome<<T as FromData<'a>>::Owned, (Status, <T as FromData<'a>>::Error), Data>, Outcome<&'a <T as FromData<'a>>::Borrowed, (Status, <T as FromData<'a>>::Error), Data>>
) -> Outcome<T, (Status, <T as FromData<'a>>::Error), Data>
impl<T> IntoCollection<T> for T
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,