[][src]Enum juniper::http::GraphQLBatchResponse

pub enum GraphQLBatchResponse<'a, S = DefaultScalarValue> where
    S: ScalarValue
{ Single(GraphQLResponse<'a, S>), Batch(Vec<GraphQLResponse<'a, S>>), }

Simple wrapper around the result (GraphQLResponse) from executing a GraphQLBatchRequest

This struct implements Serialize, so you can simply serialize this to JSON and send it over the wire. use the is_ok to determine wheter to send a 200 or 400 HTTP status code.

Variants

Single(GraphQLResponse<'a, S>)

Result of a single operation in a GraphQL request.

Batch(Vec<GraphQLResponse<'a, S>>)

Result of a batch operation in a GraphQL request.

Implementations

impl<'a, S> GraphQLBatchResponse<'a, S> where
    S: ScalarValue
[src]

pub fn is_ok(&self) -> bool[src]

Returns if all the GraphQLResponse in this operation are ok, you can use it to determine wheter to send a 200 or 400 HTTP status code.

Trait Implementations

impl<'a, S> Serialize for GraphQLBatchResponse<'a, S> where
    S: ScalarValue,
    S: Serialize
[src]

Auto Trait Implementations

impl<'a, S> RefUnwindSafe for GraphQLBatchResponse<'a, S> where
    S: RefUnwindSafe
[src]

impl<'a, S> Send for GraphQLBatchResponse<'a, S> where
    S: Send
[src]

impl<'a, S> Sync for GraphQLBatchResponse<'a, S> where
    S: Sync
[src]

impl<'a, S> Unpin for GraphQLBatchResponse<'a, S> where
    S: Unpin
[src]

impl<'a, S> UnwindSafe for GraphQLBatchResponse<'a, S> where
    S: UnwindSafe
[src]

Blanket Implementations

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

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

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

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

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

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.

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.

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