Struct juniper_rocket::GraphQLRequest [−][src]
pub struct GraphQLRequest<S = DefaultScalarValue>(_)
where
S: ScalarValue;
Expand description
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.
Implementations
pub fn execute_sync<CtxT, QueryT, MutationT, SubscriptionT>(
&self,
root_node: &RootNode<'_, QueryT, MutationT, SubscriptionT, S>,
context: &CtxT
) -> GraphQLResponse where
QueryT: GraphQLType<S, Context = CtxT>,
MutationT: GraphQLType<S, Context = CtxT>,
SubscriptionT: GraphQLType<S, Context = CtxT>,
pub fn execute_sync<CtxT, QueryT, MutationT, SubscriptionT>(
&self,
root_node: &RootNode<'_, QueryT, MutationT, SubscriptionT, S>,
context: &CtxT
) -> GraphQLResponse where
QueryT: GraphQLType<S, Context = CtxT>,
MutationT: GraphQLType<S, Context = CtxT>,
SubscriptionT: GraphQLType<S, Context = CtxT>,
Synchronously execute an incoming GraphQL query.
pub async fn execute<CtxT, QueryT, MutationT, SubscriptionT>(
&self,
root_node: &RootNode<'_, QueryT, MutationT, SubscriptionT, S>,
context: &CtxT
) -> GraphQLResponse where
QueryT: GraphQLTypeAsync<S, Context = CtxT>,
QueryT::TypeInfo: Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT>,
MutationT::TypeInfo: Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT>,
SubscriptionT::TypeInfo: Sync,
CtxT: Sync,
S: Send + Sync,
pub async fn execute<CtxT, QueryT, MutationT, SubscriptionT>(
&self,
root_node: &RootNode<'_, QueryT, MutationT, SubscriptionT, S>,
context: &CtxT
) -> GraphQLResponse where
QueryT: GraphQLTypeAsync<S, Context = CtxT>,
QueryT::TypeInfo: Sync,
MutationT: GraphQLTypeAsync<S, Context = CtxT>,
MutationT::TypeInfo: Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = CtxT>,
SubscriptionT::TypeInfo: Sync,
CtxT: Sync,
S: Send + Sync,
Asynchronously execute an incoming GraphQL query.
Returns the operation names associated with this request.
For batch requests there will be multiple names.
Trait Implementations
Asynchronously validates, parses, and converts an instance of Self
from the incoming request body data. Read more
type Context = GraphQLContext<'f, S>
type Context = GraphQLContext<'f, S>
The form guard’s parsing context.
Processes the value field field
.
Processes the data field field
.
Processes the external form or field error _error
. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self
into a collection.
pub fn vzip(self) -> V