DefaultGraphQLClient

data class DefaultGraphQLClient(val host: String = DefaultGraphQLSettings.DEFAULT_HOST, val port: Int = DefaultGraphQLSettings.DEFAULT_PORT, enableSubscription: Boolean = false) : GraphQLClient

Default GraphQL client implementation.

Parameters

host

the host of the GraphQL server

port

the port of the GraphQL server

enableSubscription

whether to enable subscriptions or not

Constructors

Link copied to clipboard
constructor(host: String = DefaultGraphQLSettings.DEFAULT_HOST, port: Int = DefaultGraphQLSettings.DEFAULT_PORT, enableSubscription: Boolean = false)

Properties

Link copied to clipboard
open override val host: String
Link copied to clipboard
open override val port: Int

Functions

Link copied to clipboard
open override fun close()

Closes the client.

Link copied to clipboard
open override fun <D : Mutation.Data> mutation(mutation: Mutation<D>): ApolloCall<D>

Prepare a mutation to be executed.

Link copied to clipboard
open override fun <D : Query.Data> query(query: Query<D>): ApolloCall<D>

Prepare a query to be executed.

Link copied to clipboard
open fun serverUrl(): String

The URL of the GraphQL server.

Link copied to clipboard
open override fun <D : Subscription.Data> subscription(subscription: Subscription<D>): ApolloCall<D>

Prepare a subscription to be executed.

Link copied to clipboard
open override fun subscriptionUrl(): String

The URL of the GraphQL server subscription.