Executable

Base interface for Operation and Fragment that have a Adapter and Variables.

Fragments cannot be executed against a server but can be executed against the cache.

Inheritors

Types

Link copied to clipboard
interface Data

Marker interface for generated models

Link copied to clipboard
class Variables(val valueMap: VariablesJson)

A helper class to hold variables

Properties

Link copied to clipboard
abstract val ignoreErrors: Boolean

A flag to disable error checking for the whole operation. Used for backward compatibility.

Functions

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

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

Link copied to clipboard
fun <D : Executable.Data> Executable<D>.composeData(jsonWriter: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: D)
Link copied to clipboard

Returns the Set of boolean variables that are false either explicitly or because there is a default value

Link copied to clipboard
fun <D : Executable.Data> Executable<D>.parseData(jsonReader: JsonReader, customScalarAdapters: CustomScalarAdapters = CustomScalarAdapters.Empty, falseVariables: Set<String>? = null, deferredFragmentIds: Set<DeferredFragmentIdentifier>? = null, errors: List<Error>? = null): D?
Link copied to clipboard
abstract 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 fun serializeVariables(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, withDefaultValues: Boolean)

Serializes the variables of this operation to a json

Link copied to clipboard

Returns a map of the variables as they would be sent over the wire. Use this to construct your own HTTP requests

fun <D : Executable.Data> Executable<D>.variables(customScalarAdapters: CustomScalarAdapters, withDefaultValues: Boolean): Executable.Variables
Link copied to clipboard

Returns the variables as they would be sent over the wire. Use this to construct your own HTTP requests