You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
move those hard-coded configuration in ConfiguringObjectMapperProvider to DefaultObjectMapperConfigurer, others would like to implement ObjectMapperConfigurer can either extend DefaultObjectMapperConfigurer to keep default configuration (with some extra configuration) or implement its own by directly implement ObjectMapperConfigurer.
ConfiguringObjectMapperProvider optionally accept a pre-configured ObjectMapper as the base, then call ObjectMapperConfigurer to decorate it.
The text was updated successfully, but these errors were encountered:
sammyhk
added a commit
to sammyhk/graphql-java-servlet
that referenced
this issue
May 7, 2019
Currently configuring ObjectMapper can be either:
ObjectMapperConfigurer
which is in decorator pattern, cannot use the existing ObjectMapper configuration used in other part of the system.ObjectMapperProvider
to create/ re-use existing ObjectMapper configuration, but this way may have code coupling onConfiguringObjectMapperProvider
because current implementation some configuration is hard-coded inConfiguringObjectMapperProvider
(https://github.com/graphql-java-kickstart/graphql-java-servlet/blob/master/src/main/java/graphql/servlet/ConfiguringObjectMapperProvider.java#L22-L28), new implementation need to duplicate those code in order to make it work (e.g. issue Avoid explicitly inject ObjectMapper to the ObjectMapper #177)Suggested improvement:
ConfiguringObjectMapperProvider
toDefaultObjectMapperConfigurer
, others would like to implementObjectMapperConfigurer
can either extendDefaultObjectMapperConfigurer
to keep default configuration (with some extra configuration) or implement its own by directly implementObjectMapperConfigurer
.ConfiguringObjectMapperProvider
optionally accept a pre-configuredObjectMapper
as the base, then callObjectMapperConfigurer
to decorate it.The text was updated successfully, but these errors were encountered: