Repository navigation
Conversation
berngp
marked this pull request as ready for review
November 24, 2026 23:56
berngp
requested review from
asibross,
iparadiso,
iuliiasobolevska,
jjacobs44,
kzwang,
paulbakker and
srinivasankavitha
as code owners
November 24, 2026 23:56
sahuadarsh0
reviewed
Nov 30, 2026
Why: SourceArgumentResolver accepts only a source that is an instance of the parameter type. When a parent data fetcher returns a Map for an object type, a method with `@Source Show show` fails with "Invalid source type". What: a Map source is now converted to the parameter type with the `InputObjectMapper`, the same mapper that `@InputArgument` uses. A source that is an instance of the parameter type is still passed as is. Any other source still fails with the same error. How: `SourceArgumentResolver` takes an `InputObjectMapper` (default `DefaultInputObjectMapper`) and uses `InputObjectMapperConverter` for a Map source. `DgsInputArgumentConfiguration` gives it the `InputObjectMapper` bean. New tests cover both Kotlin and Java. Implications: a Map source for a parameter type that the mapper cannot build now fails with the mapper error, not "Invalid source type".
berngp
force-pushed
the
feature/EDPR-1216-source-map
branch
from
December 1, 2026 00:36
cb6f1fe to
e274cc5
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull request checklist
first
Pull Request type
Changes in this PR
Why
A
SourceArgumentResolveraccepts only a source that is an instance of the parameter type. When a parent data fetcher returns aMapfor an object type, a method with@Source Show showfails with "Invalid source type".What
A
Mapsource is now converted to the parameter type with theInputObjectMapper, the same mapper that@InputArgumentuses. A source that is an instance of the parameter type is still passed as is. Any other source still fails with the same error.How
A
SourceArgumentResolvertakes anInputObjectMapper(defaultDefaultInputObjectMapper) and usesInputObjectMapperConverterfor a Map source.DgsInputArgumentConfigurationgives it theInputObjectMapperbean.New tests cover both Kotlin and Java.
Implications
A Map source for a parameter type that the mapper cannot build now fails with the mapper error, not "Invalid source type".