-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
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
null values sent in response json #485
Comments
Cross posted to Stackoverflow https://stackoverflow.com/questions/77782450/null-values-sent-in-response-json-by-graphql-spqr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have configured our spring boot app to not send null values back in json but we are still getting the null values back. The setup to not send null values using jackson ObjectMapper is in BootstrapConfig like this:
We were earlier using:
implementation 'io.leangen.graphql:spqr:0.12.1'
but after upgrade to 0.12.3 we are getting same results.
When we print the gradle dependencies we do have
com.google.code.gson:gson
as a dependency of another library.Is it possible spqr is using gson rather than jackson for object mapping. That seems to be the case as when I convert my entity to json in my EntityMutation class I DO NOT see any null values. And if I convert that json back to an entity and return that entity then the front end does not get null values.
Is there any way to ensure that jackson object mapper is used and not gson or am I missing something else in my setup?
The text was updated successfully, but these errors were encountered: