pub struct GraphQLResponse<'a, S = DefaultScalarValue>(_);
Expand description

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.

Implementations

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

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.