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.
Used by
QueryTraverser 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) and QueryTraverser.reducePreOrder(QueryReducer, Object)
-
Method Summary
Modifier and TypeMethodDescriptionreduceField(QueryVisitorFieldEnvironment fieldEnvironment, T acc) Called each time a field is visited.
-
Method Details
-
reduceField
Called each time a field is visited.- Parameters:
fieldEnvironment- the environment to this callacc- the previous result- Returns:
- the new result
-