Package graphql.analysis
Interface QueryReducer<T>
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@PublicApi @FunctionalInterface public interface QueryReducer<T>
Used byQueryTraverser
to reduce the fields of a Document (or part of it) to a single value.How this happens in detail (pre vs post-order for example) is defined by
QueryTraverser
.See
QueryTraverser.reducePostOrder(QueryReducer, Object)
andQueryTraverser.reducePreOrder(QueryReducer, Object)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
reduceField(QueryVisitorFieldEnvironment fieldEnvironment, T acc)
Called each time a field is visited.
-
-
-
Method Detail
-
reduceField
T reduceField(QueryVisitorFieldEnvironment fieldEnvironment, T acc)
Called each time a field is visited.- Parameters:
fieldEnvironment
- the environment to this callacc
- the previous result- Returns:
- the new result
-
-