GraphQLScalar
Marks a given class or typealias as a custom GraphQL scalar.
@GraphQLScalar(GeoPointCoercing::class)
class GeoPoint(val x: Double, val y: Double)
Content copied to clipboard
If you do not control the type, you can use a type alias:
@GraphQLScalar(DateCoercing::class)
@GraphQLName("Date")
typealias GraphQLDate = java.util.Date
Content copied to clipboard
When using type aliases, you may use either the alias or the original type.