Apollo Response
class ApolloResponse<out D : Operation.Data>(requestUuid: Uuid, operation: Operation<*>, data: D?, errors: List<Error>?, extensions: Map<String, Any?>, executionContext: ExecutionContext)
Content copied to clipboard
Represents a GraphQL response. GraphQL responses can be be partial responses so it is valid to have both data != null and errors
Constructors
ApolloResponse
Link copied to clipboard
fun <out D : Operation.Data> ApolloResponse(requestUuid: Uuid, operation: Operation<*>, data: D?, errors: List<Error>? = null, extensions: Map<String, Any?> = emptyMap(), executionContext: ExecutionContext = ExecutionContext.Empty)
Content copied to clipboard
Functions
copy
Link copied to clipboard
fun copy(requestUuid: Uuid = this.requestUuid, operation: Operation<*> = this.operation, data: Any? = this.data, errors: List<Error>? = this.errors, extensions: Map<String, Any?> = this.extensions, executionContext: ExecutionContext = this.executionContext): ApolloResponse<D>
Content copied to clipboard
withExecutionContext
Link copied to clipboard
fun withExecutionContext(executionContext: ExecutionContext): ApolloResponse<D>
Content copied to clipboard
Properties
dataAssertNoErrors
Link copied to clipboard
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>
dataOrThrow
Link copied to clipboard
executionContext
Link copied to clipboard
The context of GraphQL operation execution.
extensions
Link copied to clipboard
requestUuid
Link copied to clipboard