Package-level declarations

Types

Link copied to clipboard
interface GraphQLJson

Pluggable serialization abstraction for GraphQL request and response bodies.

Link copied to clipboard
@Serializable
data class GraphQLRequest<TVariables : GraphQLVariables>(val query: String, val operationName: String, val variables: TVariables? = null, val extensions: Map<String, Any?> = emptyMap())

A typed GraphQL request payload.

Link copied to clipboard

Thrown when a GraphQL response contains errors and the caller requires non-null data.

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.