[−][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: Debug> Debug for GraphQLRequest<S> where
S: ScalarValue,
[src]
S: ScalarValue,
impl<S> FromDataSimple for GraphQLRequest<S> where
S: ScalarValue,
[src]
S: ScalarValue,
type Error = String
The associated error to be returned when the guard fails.
fn from_data(
request: &Request,
data: Data
) -> FromDataOutcome<Self, Self::Error>
[src]
request: &Request,
data: Data
) -> FromDataOutcome<Self, Self::Error>
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<'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]
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> StructuralPartialEq for GraphQLRequest<S> where
S: ScalarValue,
[src]
S: ScalarValue,
Auto Trait Implementations
impl<S> RefUnwindSafe for GraphQLRequest<S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<S> Send for GraphQLRequest<S> where
S: Send,
S: Send,
impl<S> Sync for GraphQLRequest<S> where
S: Sync,
S: Sync,
impl<S> Unpin for GraphQLRequest<S> where
S: Unpin,
S: Unpin,
impl<S> UnwindSafe for GraphQLRequest<S> where
S: UnwindSafe,
S: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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, 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> Typeable for T where
T: Any,
T: Any,