Package graphql.analysis
Class QueryTraverser.Builder
java.lang.Object
graphql.analysis.QueryTraverser.Builder
- Enclosing class:
QueryTraverser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
coercedVariables
(CoercedVariables coercedVariables) Variables (already coerced) used in the query.document to be used to traverse the whole query.fragmentsByName
(Map<String, FragmentDefinition> fragmentsByName) Fragment by name map.operationName
(String operationName) specify the operation if a document is traversed and there are more than one operation.options
(QueryTraversalOptions options) Sets the options to use while traversingSpecify the root node for the traversal.rootParentType
(GraphQLCompositeType rootParentType) The type of the parent of the root node.schema
(GraphQLSchema schema) The schema used to identify the types of the query.Raw variables used in the query.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
schema
The schema used to identify the types of the query.- Parameters:
schema
- the schema to use- Returns:
- this builder
-
operationName
specify the operation if a document is traversed and there are more than one operation.- Parameters:
operationName
- the operation name to use- Returns:
- this builder
-
document
document to be used to traverse the whole query. If set aoperationName(String)
might be required.- Parameters:
document
- the document to use- Returns:
- this builder
-
variables
Raw variables used in the query.- Parameters:
variables
- the variables to use- Returns:
- this builder
-
coercedVariables
Variables (already coerced) used in the query.- Parameters:
coercedVariables
- the variables to use- Returns:
- this builder
-
root
Specify the root node for the traversal. Needs to be provided if there is nodocument(Document)
.- Parameters:
root
- the root node to use- Returns:
- this builder
-
rootParentType
The type of the parent of the root node. (Seeroot(Node)
- Parameters:
rootParentType
- the root parent type- Returns:
- this builder
-
fragmentsByName
Fragment by name map. Needs to be provided together with aroot(Node)
androotParentType(GraphQLCompositeType)
- Parameters:
fragmentsByName
- the map of fragments- Returns:
- this builder
-
options
Sets the options to use while traversing- Parameters:
options
- the options to use- Returns:
- this builder
-
build
- Returns:
- a built
QueryTraverser
object
-