ApolloResponse

class ApolloResponse<D : Operation.Data>

Represents a GraphQL response. GraphQL responses can be be partial responses so it is valid to have both data != null and errors

Types

Builder
Link copied to clipboard
common
class Builder<D : Operation.Data>(operation: Operation<D>, requestUuid: Uuid, data: D?)

Functions

hasErrors
Link copied to clipboard
common
fun hasErrors(): Boolean
newBuilder
Link copied to clipboard
common
fun newBuilder(): ApolloResponse.Builder<D>

Properties

data
Link copied to clipboard
common
val data: D?
Parsed response of GraphQL operation execution.
dataAssertNoErrors
Link copied to clipboard
common
val dataAssertNoErrors: D
A shorthand property to get a non-nullable data if handling partial data is not importantNote: A future version could use Definitely non nullable types to implement something like ApolloResponse<D>.assertNoErrors(): ApolloResponse<D & Any>
errors
Link copied to clipboard
common
val errors: List<Error>?
GraphQL operation execution errors returned by the server to let client know that something has gone wrong.
executionContext
Link copied to clipboard
common
val executionContext: ExecutionContext
The context of GraphQL operation execution.
extensions
Link copied to clipboard
common
val extensions: Map<String, Any?>
Extensions of GraphQL protocol, arbitrary map of key String / value Any sent by server along with the response.
operation
Link copied to clipboard
common
val operation: Operation<D>
The GraphQL operation this response represents
requestUuid
Link copied to clipboard
common
val requestUuid: Uuid