Skip to content
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

bug: dgsQueryExecutor.executeAndExtractJsonPathAsObject cannot deserialize DateTime scalars #269

Closed
richardcresswell opened this issue Apr 15, 2021 · 3 comments · Fixed by #271
Labels
bug Something isn't working

Comments

@richardcresswell
Copy link
Contributor

richardcresswell commented Apr 15, 2021

Expected behavior

The framework should serialize the json response to an object, including DateTime scalar values.

Actual behavior

Jackson's ObjectMapper does not know about the scalar and a DgsQueryExecutionDataExtractionException is thrown.

Steps to reproduce

Please see the issue I opened in dgs-examples-java.

@richardcresswell richardcresswell added the bug Something isn't working label Apr 15, 2021
@richardcresswell richardcresswell changed the title bug: dgsQueryExecutor.executeAndExtractJsonPathAsObject cannot deserialize scalar types bug: dgsQueryExecutor.executeAndExtractJsonPathAsObject cannot deserialize DateTime scalars Apr 15, 2021
@richardcresswell
Copy link
Contributor Author

richardcresswell commented Apr 15, 2021

I'm not sure if this is as simple as adding

.registerModule(JavaTimeModule())

to the ObjectMapper initialization in DefaultDgsQueryExecutor.kt

@srinivasankavitha
Copy link
Contributor

Thanks for reporting, we will look into it.

@richardcresswell
Copy link
Contributor Author

@srinivasankavitha I managed to fix it and will have a pull request in soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants