Skip to content

Commit 89a4494

Browse files
committed
Polishing entity argument resolvers
Closes gh-996
1 parent 8d8432d commit 89a4494

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

spring-graphql/src/main/java/org/springframework/graphql/data/federation/EntityArgumentMethodArgumentResolver.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ static DataFetchingEnvironment wrap(DataFetchingEnvironment env, List<Map<String
9696
}
9797

9898

99+
/**
100+
* Wrap the DataFetchingEnvironment to also make the representation map available.
101+
*/
99102
static class EntityDataFetchingEnvironment extends DelegatingDataFetchingEnvironment {
100103

101104
private final Map<String, Object> representation;
@@ -111,6 +114,10 @@ Map<String, Object> getRepresentation() {
111114
}
112115

113116

117+
/**
118+
* Wrap the DataFetchingEnvironment to also make representation maps available
119+
* for batched invocations.
120+
*/
114121
static class EntityBatchDataFetchingEnvironment extends DelegatingDataFetchingEnvironment {
115122

116123
private final List<Map<String, Object>> representations;

spring-graphql/src/main/java/org/springframework/graphql/data/federation/EntityArgumentsMethodArgumentResolver.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
import org.springframework.util.Assert;
3131

3232
/**
33-
* Resolver for the representation map of an entity, or for all representations
34-
* for the target schema type (batched handler methods).
33+
* Resolver that exposes the raw representation input {@link Map},
34+
* or {@link List} of maps for batched invocations.
3535
*
3636
* @author Rossen Stoyanchev
3737
*/

0 commit comments

Comments
 (0)