Enum juniper::http::GraphQLBatchRequest [−][src]
pub enum GraphQLBatchRequest<S = DefaultScalarValue> where
S: ScalarValue, { Single(GraphQLRequest<S>), Batch(Vec<GraphQLRequest<S>>), }
Expand description
Simple wrapper around GraphQLRequest to allow the handling of Batch requests.
Variants
Single(GraphQLRequest<S>)
A single operation request.
Batch(Vec<GraphQLRequest<S>>)
A batch operation request.
Empty batch is considered as invalid value, so cannot be deserialized.
Implementations
pub fn execute_sync<'a, QueryT, MutationT, SubscriptionT>(
&'a self,
root_node: &'a RootNode<'_, QueryT, MutationT, SubscriptionT, S>,
context: &QueryT::Context
) -> GraphQLBatchResponse<'a, S> where
QueryT: GraphQLType<S>,
MutationT: GraphQLType<S, Context = QueryT::Context>,
SubscriptionT: GraphQLType<S, Context = QueryT::Context>,
[src]
pub fn execute_sync<'a, QueryT, MutationT, SubscriptionT>(
&'a self,
root_node: &'a RootNode<'_, QueryT, MutationT, SubscriptionT, S>,
context: &QueryT::Context
) -> GraphQLBatchResponse<'a, S> where
QueryT: GraphQLType<S>,
MutationT: GraphQLType<S, Context = QueryT::Context>,
SubscriptionT: GraphQLType<S, Context = QueryT::Context>,
[src]Execute a GraphQL batch request synchronously using the specified schema and context
This is a simple wrapper around the execute_sync
function exposed in GraphQLRequest.
pub async fn execute<'a, QueryT, MutationT, SubscriptionT>(
&'a self,
root_node: &'a RootNode<'a, QueryT, MutationT, SubscriptionT, S>,
context: &'a QueryT::Context
) -> GraphQLBatchResponse<'a, S> where
QueryT: GraphQLTypeAsync<S>,
QueryT::TypeInfo: Sync,
QueryT::Context: Sync,
MutationT: GraphQLTypeAsync<S, Context = QueryT::Context>,
MutationT::TypeInfo: Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = QueryT::Context>,
SubscriptionT::TypeInfo: Sync,
S: Send + Sync,
[src]
pub async fn execute<'a, QueryT, MutationT, SubscriptionT>(
&'a self,
root_node: &'a RootNode<'a, QueryT, MutationT, SubscriptionT, S>,
context: &'a QueryT::Context
) -> GraphQLBatchResponse<'a, S> where
QueryT: GraphQLTypeAsync<S>,
QueryT::TypeInfo: Sync,
QueryT::Context: Sync,
MutationT: GraphQLTypeAsync<S, Context = QueryT::Context>,
MutationT::TypeInfo: Sync,
SubscriptionT: GraphQLSubscriptionType<S, Context = QueryT::Context>,
SubscriptionT::TypeInfo: Sync,
S: Send + Sync,
[src]Executes a GraphQL request using the specified schema and context
This is a simple wrapper around the execute
function exposed in
GraphQLRequest
The operation names of the request.
Trait Implementations
impl<'de, S> Deserialize<'de> for GraphQLBatchRequest<S> where
S: ScalarValue,
InputValue<S>: Deserialize<'de>,
[src]
impl<'de, S> Deserialize<'de> for GraphQLBatchRequest<S> where
S: ScalarValue,
InputValue<S>: Deserialize<'de>,
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]Deserialize this value from the given Serde deserializer. Read more
impl<S: PartialEq> PartialEq<GraphQLBatchRequest<S>> for GraphQLBatchRequest<S> where
S: ScalarValue,
[src]
impl<S: PartialEq> PartialEq<GraphQLBatchRequest<S>> for GraphQLBatchRequest<S> where
S: ScalarValue,
[src]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 GraphQLBatchRequest<S> where
S: RefUnwindSafe,
impl<S> Send for GraphQLBatchRequest<S> where
S: Send,
impl<S> Sync for GraphQLBatchRequest<S> where
S: Sync,
impl<S> Unpin for GraphQLBatchRequest<S> where
S: Unpin,
impl<S> UnwindSafe for GraphQLBatchRequest<S> where
S: UnwindSafe,