Coercing

interface Coercing<T>

See https://www.graphql.de/blog/scalars-in-depth/ See the diagram in https://github.com/graphql/graphql-js/pull/3049

Parameters

T

the InternalValue to coerce

Inheritors

Functions

Link copied to clipboard
abstract fun deserialize(value: ApolloJsonElement?): T

Deserializes from an external JSON value to an internal Kotlin value.

Link copied to clipboard
abstract fun parseLiteral(value: GQLValue): T

Deserializes from a GraphQL value to an internal value (Kotlin).

Link copied to clipboard
abstract fun serialize(internalValue: T): ApolloJsonElement?

Serializes from an internal Kotlin value to an external JSON value.