We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I create a data class like this:
data class Person( val firstname: String, val lastname: String, val age: Int, val birthdate: Date )
And thewn create a query resolver like this:
fun SchemaBuilder.person() { query("me") { resolver { -> Person("Hans", "Meier", 24, Date.valueOf(LocalDate.parse("1998-02-12"))) } } }
I get the following error:
An Object type must define one or more fields. Found none on type Date
Is there any way to tell the framework to use a custom serializer, to fix this?
The text was updated successfully, but these errors were encountered:
You can write a custom serializer in the schema like that:
fun SchemaBuilder.serializerDate() { longScalar<Date> { serialize = { date -> date.time } deserialize = { dateString -> Date(dateString) } } }
Sorry, something went wrong.
No branches or pull requests
When I create a data class like this:
And thewn create a query resolver like this:
I get the following error:
Is there any way to tell the framework to use a custom serializer, to fix this?
The text was updated successfully, but these errors were encountered: