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

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

Functions

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

Properties

Link copied to clipboard
val data: D?

Parsed response of GraphQL operation execution. Can be null in case if operation execution failed.

Link copied to clipboard
@get:JvmName(name = "dataAssertNoErrors")
val dataAssertNoErrors: D

A shorthand property to get a non-nullable data if handling partial data is not important

Link copied to clipboard
val errors: List<Error>?

GraphQL operation execution errors returned by the server to let client know that something has gone wrong. This can either be null or empty depending on what your server sends back

Link copied to clipboard
val executionContext: ExecutionContext

The context of GraphQL operation execution. This can contain additional data contributed by interceptors.

Link copied to clipboard
val extensions: Map<String, Any?>

Extensions of GraphQL protocol, arbitrary map of key String / value Any sent by server along with the response.

Link copied to clipboard
val isLast: Boolean

Indicates that this ApolloResponse is the last ApolloResponse in a given Flow and that no other items are expected.

Link copied to clipboard
val operation: Operation<D>

The GraphQL operation this response represents

Link copied to clipboard
val requestUuid: Uuid