ApolloResponse
Represents a GraphQL response or an exception if no GraphQL response is received.
data contains the parsed data returned in the response
errors contains any GraphQL errors returned in the response
exception contains an exception if a GraphQL response wasn't received
GraphQL responses can contain partial data, so it is possible to have both data != null and errors != null. An ApolloResponse may be in any of these states:
exception == null && data != null && errors == null: complete data with no errors
exception == null && data != null && errors != null: partial data with GraphQL errors
exception == null && data == null && errors != null: no data, only GraphQL errors
exception == null && data == null && errors == null: no data and no errors - while technically possible, this should not happen with a spec-compliant server
exception != null && data == null && errors == null: no GraphQL response was received due to a network error or otherwise
Properties
A shorthand property to get a non-nullable data
if handling partial data is not important
An ApolloException if a GraphQL response wasn't received.
The context of GraphQL operation execution. This can contain additional data contributed by interceptors.
Indicates that this ApolloResponse is the last ApolloResponse in a given Flow and that no other items are expected.
Functions
Return data if not null or throws NoDataException else