Struct apollo_compiler::execution::Response
source · pub struct Response {
pub errors: Vec<GraphQLError>,
pub data: ResponseData,
pub extensions: JsonMap,
}
Expand description
Fields§
§errors: Vec<GraphQLError>
§data: ResponseData
§extensions: JsonMap
Reserved for any additional information
Implementations§
source§impl Response
impl Response
sourcepub fn from_request_error(error: impl Into<GraphQLError>) -> Self
pub fn from_request_error(error: impl Into<GraphQLError>) -> Self
Create a response for a request error: handling of a request was aborted before execution started.
sourcepub fn merge(self, other: Self) -> Self
pub fn merge(self, other: Self) -> Self
Merge two responses into one, such as to handle
SchemaIntrospectionSplit::Both
.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more