GraphContainer

data class GraphContainer<T>(val data: T? = null, val errors: List<GraphError>? = null, val extensions: Map<Any, Any>? = null)(source)

GraphQL response that is spec complaint.

See also

Constructors

Link copied to clipboard
constructor(data: T? = null, errors: List<GraphError>? = null, extensions: Map<Any, Any>? = null)

Properties

Link copied to clipboard
val data: T?
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
inline fun <T, R> GraphContainer<T>.mapData(transform: (T) -> R): R?

Transforms GraphContainer.data with transform if present, or returns null.

Link copied to clipboard

Returns the non-null GraphContainer.data or throws GraphQLResponseException if the response contains errors.