ObjectMapper in tests using DefaultDGSQueryExecutor #189
Replies: 2 comments 2 replies
-
|
Do you have some example code you can share to help reproduce the issue? I thought we have JavaTimeModule included already, but apparently something is still missing. |
Beta Was this translation helpful? Give feedback.
-
|
I have a similar problem, it doesn't work in runtime as well. Tried registering From what I understand, it seems to be that the mapping form graphql mutation input to the generated input pojo is failing |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I've got deserialization problems in tests after adding custom scalars. I've registered JavaTimeModule (JSR-310) into objectMapper bean. The problem is - in running application it works, but in tests still failing. I've debugged DefaultDGSQueryExecutor and turned out that it creates new instance of objectMapper and there's no simple solution to register additional modules or to reuse objectMapper from spring context.
I've ended with creating custom implementation for DGSQueryExecutor where objectMapper is autowired from app context.
The point is: am I missing something? If not - I suggest some changes ;)
Beta Was this translation helpful? Give feedback.
All reactions