You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on May 16, 2019. It is now read-only.
Paweł Gutkowski edited this page Jul 28, 2017
·
1 revision
As defined by specification, scalar represents a primitive value in GraphQL. In KGraphQL, besides built-in scalar types, client code can declare custom scalar type, which can coerce to String, Boolean, Int, Long or Float (Kotlin Double).
KGraphQL provides group of DSL methods: stringScalar { }, booleanScalar { }, intScalar{ }, longScalar{ }, floatScalar{ }. They differ only by Kotlin primitive type they coerce to.
Scalar has to define its coercion functions deserialize and serialize or coercion object which implements correct subtype of com.github.pgutkowski.kgraphql.schema.scalar.ScalarCoercion.