GraphQLClient

class GraphQLClient(var apiCategory: ApiCategory)

Wrapper class around the apiCategory to maintain concept cleanliness.

Constructors

Link copied to clipboard
constructor(apiCategory: ApiCategory)

Properties

Link copied to clipboard
var apiCategory: ApiCategory

Functions

Link copied to clipboard
inline suspend fun <T : Mutation<D>, D : Mutation.Data> mutate(document: String, variables: Map<String, Any?>): GraphQLResponse<D>
Link copied to clipboard
inline suspend fun <T : Query<D>, D : Query.Data> query(document: String, variables: Map<String, Any?>): GraphQLResponse<D>
Link copied to clipboard
inline fun <T : Subscription<D>, D : Subscription.Data> subscribe(document: String, variables: Map<String, Any?>, onSubscriptionEstablished: Consumer<GraphQLResponse<D>>, onSubscription: Consumer<GraphQLResponse<D>>, onSubscriptionCompleted: Action, onFailure: Consumer<ApiException>): GraphQLOperation<D>?