How can the JSON serialization in Quarkus Smallrye GraphQL be customized? E.g. I want to omit null values from JSON:
{
"foo": "bar",
"baz": null
}
vs.
{
"foo": "bar"
}
So far, I have tried the following solutions with no success:
- Writing a CDI producer for ObjectMapper / JsonbConfig
- Implementing a Smallrye EventingService
Debugging a little into the code I found that Eclipse Parsson seems to be used to serialize the response. Is there any way to achieve the desired behavior?
Omitting fields that the client requested in a subselection would be against the GraphQL specification, so this is not possible.