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]

Constructs an error response outside of the normal execution flow

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> Serialize for GraphQLResponse<'a>
[src]

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

impl<'a> Send for GraphQLResponse<'a>

impl<'a> Sync for GraphQLResponse<'a>