-
Notifications
You must be signed in to change notification settings - Fork 359
BREAKING CHANGE: [spring-server] default data fetcher should use Jackson object mapper from spring context #525
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
Conversation
… from spring context Currently it is not possible to provide custom Jackson object mapper (e.g. one that includes java date time module) to be used by default function data fetcher. In order to use custom object mapper users have to create their own instance of data fetcher factory provider. This change updates the data fetcher factory provider to accept an instance of object mapper that will be used by the function data fetcher. Resolves: ExpediaGroup#524
LGTM |
Is this ready for review? Was there some other feature you were looking to add? |
Looking into adding some unit test for this. |
Previous default implmenetation is now renamed to SimpleKotlinDataFetcherFactoryProvider.
@dariuszkuc This look good to me. We have the single test. Is this good to merge? |
@smyrick this should be good to merge - was looking into whether we need to have that jackson object mapper in the first place and unfortunately it is required in order to process any complex input objects. On the side note - currently we do an extra conversion from primitive scalar value to the same scalar type (as noted here). Unsure how big of a perf impact that is but we might want to optimize it as well. |
Major version changes now that we changed from class to interface |
… from spring context (ExpediaGroup#525) * [spring-server] default data fetcher should use Jackson object mapper from spring context Currently it is not possible to provide custom Jackson object mapper (e.g. one that includes java date time module) to be used by default function data fetcher. In order to use custom object mapper users have to create their own instance of data fetcher factory provider. This change updates the data fetcher factory provider to accept an instance of object mapper that will be used by the function data fetcher. Resolves: ExpediaGroup#524 * unit test for verifying proper object mapper is used * convert KotlinDataFetcherFactoryProvider to interface Previous default implmenetation is now renamed to SimpleKotlinDataFetcherFactoryProvider. * add integration test to verify custom jackson bindings work with function data fetcher * remove unnecessary val definition
📝 Description
Currently it is not possible to provide custom Jackson object mapper (e.g. one that includes java date time module) to be used by default function data fetcher. In order to use custom object mapper users have to create their own instance of data fetcher factory provider. This change updates the data fetcher factory provider to accept an instance of object mapper that will be used by the function data fetcher.
🔗 Related Issues
Resolves: #524