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>)
Expand description

A single operation request.

Batch(Vec<GraphQLRequest<S>>)
Expand description

A batch operation request.

Empty batch is considered as invalid value, so cannot be deserialized.

Implementations

impl<S> GraphQLBatchRequest<S> where
    S: ScalarValue
[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]

Executes a GraphQL request using the specified schema and context

This is a simple wrapper around the execute function exposed in GraphQLRequest

pub fn operation_names(&self) -> Vec<Option<&str>>[src]

The operation names of the request.

Trait Implementations

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

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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]

Deserialize this value from the given Serde deserializer. Read more

impl<S: PartialEq> PartialEq<GraphQLBatchRequest<S>> for GraphQLBatchRequest<S> where
    S: ScalarValue
[src]

fn eq(&self, other: &GraphQLBatchRequest<S>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, other: &GraphQLBatchRequest<S>) -> bool[src]

This method tests for !=.

impl<S> StructuralPartialEq for GraphQLBatchRequest<S> where
    S: ScalarValue
[src]

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

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]