Polishing entity argument resolvers
Closes gh-996
This commit is contained in:
@@ -96,6 +96,9 @@ final class EntityArgumentMethodArgumentResolver extends ArgumentMethodArgumentR
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wrap the DataFetchingEnvironment to also make the representation map available.
|
||||
*/
|
||||
static class EntityDataFetchingEnvironment extends DelegatingDataFetchingEnvironment {
|
||||
|
||||
private final Map<String, Object> representation;
|
||||
@@ -111,6 +114,10 @@ final class EntityArgumentMethodArgumentResolver extends ArgumentMethodArgumentR
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Wrap the DataFetchingEnvironment to also make representation maps available
|
||||
* for batched invocations.
|
||||
*/
|
||||
static class EntityBatchDataFetchingEnvironment extends DelegatingDataFetchingEnvironment {
|
||||
|
||||
private final List<Map<String, Object>> representations;
|
||||
|
||||
@@ -30,8 +30,8 @@ import org.springframework.graphql.data.method.HandlerMethodArgumentResolver;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Resolver for the representation map of an entity, or for all representations
|
||||
* for the target schema type (batched handler methods).
|
||||
* Resolver that exposes the raw representation input {@link Map},
|
||||
* or {@link List} of maps for batched invocations.
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user