CustomTypeAdapter

@ApolloDeprecatedSince(version = ApolloDeprecatedSince.Version.v3_0_0)
interface CustomTypeAdapter<T>

Deprecated

Used for backward compatibility with 2.x, use Adapter instead

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