CustomTypeAdapter

interface CustomTypeAdapter<T>

A replica of Apollo Android v2's CustomTypeAdapter, to ease migration from v2 to v3.

Make your CustomTypeAdapters implement this interface by updating the imports from com.apollographql.apollo.api to com.apollographql.apollo3.api.

Note: Adapters are called from multiple threads and implementations must be thread safe.

Functions

Link copied to clipboard
abstract fun decode(value: CustomTypeValue<*>): T
Link copied to clipboard
abstract fun encode(value: T): CustomTypeValue<*>