feat: open FunctionDataFetcher methods for extension #582
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
Open the internal methods to the protected scope so that we can more easily override specific methods to provide more features. Internally to Expedia Group we have the need to provide a
CustomFunctionDataFetcher
that overrides the get method. However we don't want to have to reimplement all the other methods as well that convert the classes and parse the arguments. Right now we are actually missing out on using the new feature to use List over array for input types. This could be fixed internally but it is already done in open source so we would like to take advantage of that.Also this will now allow users to override the coroutine context that is used for suspending functions without having to create an entirely new data fetcher implementation.
For context I found this more helpful for our upgrade to graphql-kotlin 2.0.0-RC4.3