Struct juniper::http::GraphQLResponse [−][src]
pub struct GraphQLResponse<'a>(_);
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> GraphQLResponse<'a>[src]
impl<'a> GraphQLResponse<'a>pub fn is_ok(&self) -> bool[src]
pub fn is_ok(&self) -> boolWas 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> Serialize for GraphQLResponse<'a>[src]
impl<'a> Serialize for GraphQLResponse<'a>Auto Trait Implementations
impl<'a> Send for GraphQLResponse<'a>
impl<'a> Send for GraphQLResponse<'a>impl<'a> Sync for GraphQLResponse<'a>
impl<'a> Sync for GraphQLResponse<'a>