FieldExtension: pass extended values instead of originals to after_resolve #3168
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.
This is a follow-up after #3138 which had breaking changes for our application without a real way to work around it. This proposes a solution to make extensions dealing with extended arguments more flexible.
Field Extensions let you extend (modify) the resolver object and arguments in the
resolve
hook. Previously theafter_resolve
hook would receive the original object and arguments and not the extended ones. This was a lossy process with no way forafter_resolve
to access the extended values.This changes
after_resolve
to receive the extended values instead. If you need access to the original non-extended values, thememo
argument can be used.Example:
cc @jturkel what do you think?