ListAdapter

class ListAdapter<T>(wrappedAdapter: Adapter<T>) : Adapter<List<@JvmSuppressWildcards() T>>

This file contains a list of Adapter for standard types

They are mostly used from the generated code but could be useful in any other situations that requires adapting from GraphQL to Kotlin. In particular, AnyAdapter can be used to read/write a Kotlin representation from/to Json.

Constructors

ListAdapter
Link copied to clipboard
common
fun <T> ListAdapter(wrappedAdapter: Adapter<T>)

Functions

fromJson
Link copied to clipboard
common
open override fun fromJson(reader: JsonReader, customScalarAdapters: CustomScalarAdapters): List<T>
Deserializes the given Json to the expected Kotlin type.
toJson
Link copied to clipboard
common
open override fun toJson(writer: JsonWriter, customScalarAdapters: CustomScalarAdapters, value: List<T>)
Serializes a Kotlin type into its equivalent Json representation.