Fragment

interface Fragment<D : Fragment.Data> : Executable<D>

Base interface for a fragment implementation. Fragments do not have variables per the GraphQL spec but they are inferred from arguments and used when reading the cache See https://github.com/graphql/graphql-spec/issues/204 for a proposal to add fragment arguments

Types

Link copied to clipboard
interface Data : Executable.Data

Marker interface for generated models of this fragment

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 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