Subscription

interface Subscription<D : Subscription.Data> : Operation<D>

Represents a GraphQL subscription.

Types

Link copied to clipboard
interface Data : Operation.Data

Functions

Link copied to clipboard
abstract override fun adapter(): Adapter<D>

The Adapter that maps the server response data to/from generated model class D.

Link copied to clipboard
abstract fun document(): String

The GraphQL operation String to be sent to the server. This might differ from the input *.graphql file with:

Link copied to clipboard
abstract fun id(): String

An unique identifier for the operation. Used for Automatic Persisted Queries. You can customize it with a OperationIdGenerator

Link copied to clipboard
abstract fun name(): String

The GraphQL operation name as in the *.graphql file.

Link copied to clipboard
abstract override fun rootField(): CompiledField

A list of CompiledSelection. Used when reading from the cache and/or normalizing a model. Use com.apollographql.apollo3.cache.normalized.ApolloStore.readOperation for a higher level API

Link copied to clipboard
abstract override fun serializeVariables(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters)

Serializes the variables of this operation to a json