-
Notifications
You must be signed in to change notification settings - Fork 285
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
feature: use CustomObjectMapper to serialize subscription data #1528
Comments
Hey @clayembry 👋 Our team met to discuss this issue and we came to the conclusion that we would prefer to internalize the mapping of objects used across the DGS framework, so we will instead add |
@coleturner - your fix did not fix the problem we are facing. Because neither Both of those classes that we are having issues with just instantiate their own plain ObjectMapper in the companion object using
Please fix so that those two classes inject the |
…etAutoConfig to mirror DgsWebMvcAutoConfiguration.
#1602) * Fix for #1528, setup ObjectMapper configuration for DgsWebSocketAutoConfig to mirror DgsWebMvcAutoConfiguration. * PR feedback. Removing unnecessary dgsObjectMapper bean since it will be created by the dgs starter auto config. * Linter updates. * Removed unused imports --------- Co-authored-by: Clay Embry <cembry@atlassian.com>
Describe the Feature Request
A CustomObjectMapper can be supplied for serializing GraphQL responses. But that object mapper is not used to serialize subscription data. The objectMapper used to serialize subscription data is instantiated in the companion object for the WebsocketGraphQLWSProtocolHandler class.
This is causing our subscriptions to fail sending data because the objects we are trying to send contain
OffsetDateTime
fields that cause the ObjectMapper to throw exceptions because theJavaTimeModule
is not registered with the subscription ObjectMapper.Describe Preferred Solution
Please consider injecting the CustomObjectMapper into the
WebsocketGraphQLWSProtocolHandler
class to use for serializing subscription data.The text was updated successfully, but these errors were encountered: