[−][src]Struct juniper::http::GraphQLResponse  
Simple wrapper around the result from executing a GraphQL query
This struct implements Serialize, so you can simply serialize this
to JSON and send it over the wire. Use the is_ok method to determine
whether to send a 200 or 400 HTTP status code.
Methods
impl<'a, S> GraphQLResponse<'a, S> where
    S: ScalarValue, [src]
S: ScalarValue,
pub fn error(error: FieldError<S>) -> Self[src]
Constructs an error response outside of the normal execution flow
pub fn is_ok(&self) -> bool[src]
Was the request successful or not?
Note that there still might be errors in the response even though it's considered OK. This is by design in GraphQL.
Trait Implementations
impl<'a, T> Serialize for GraphQLResponse<'a, T> where
    T: Serialize + ScalarValue,
    Value<T>: Serialize,
    ExecutionError<T>: Serialize,
    GraphQLError<'a>: Serialize, [src]
T: Serialize + ScalarValue,
Value<T>: Serialize,
ExecutionError<T>: Serialize,
GraphQLError<'a>: Serialize,
Auto Trait Implementations
impl<'a, S> Send for GraphQLResponse<'a, S> where
    S: Send, 
S: Send,
impl<'a, S> Sync for GraphQLResponse<'a, S> where
    S: Sync, 
S: Sync,
Blanket Implementations
impl<T> From for T[src]
impl<T, U> Into for T where
    U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom for T where
    T: From<U>, [src]
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from)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> Borrow for T where
    T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut for T where
    T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T, U> TryInto for T where
    U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> Any for T where
    T: 'static + ?Sized, [src]
T: 'static + ?Sized,