addCustomScalarAdapter

fun <T> addCustomScalarAdapter(customScalarType: CustomScalarType, customScalarAdapter: Adapter<T>): ApolloClient.Builder

Adds the given customScalarAdapter to this ApolloClient.

Custom scalars allow schema designers to extend the GraphQL type system with custom types such as Date or Long.

See the Apollo Kotlin documentation page and scalars.graphql.org for more information.

Parameters

customScalarType

a generated CustomScalarType. Every GraphQL custom scalar has a generated class with a static type property. For an example, for a Date custom scalar, you can use com.example.Date.type

customScalarAdapter

the Adapter to use for this custom scalar.