Package graphql.analysis
Class QueryTraverser.Builder
- java.lang.Object
-
- graphql.analysis.QueryTraverser.Builder
-
- Enclosing class:
- QueryTraverser
@PublicApi public static class QueryTraverser.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryTraverserbuild()QueryTraverser.BuildercoercedVariables(CoercedVariables coercedVariables)Variables (already coerced) used in the query.QueryTraverser.Builderdocument(Document document)document to be used to traverse the whole query.QueryTraverser.BuilderfragmentsByName(java.util.Map<java.lang.String,FragmentDefinition> fragmentsByName)Fragment by name map.QueryTraverser.BuilderoperationName(java.lang.String operationName)specify the operation if a document is traversed and there are more than one operation.QueryTraverser.Builderroot(Node root)Specify the root node for the traversal.QueryTraverser.BuilderrootParentType(GraphQLCompositeType rootParentType)The type of the parent of the root node.QueryTraverser.Builderschema(GraphQLSchema schema)The schema used to identify the types of the query.QueryTraverser.Buildervariables(java.util.Map<java.lang.String,java.lang.Object> variables)Raw variables used in the query.
-
-
-
Method Detail
-
schema
public QueryTraverser.Builder schema(GraphQLSchema schema)
The schema used to identify the types of the query.- Parameters:
schema- the schema to use- Returns:
- this builder
-
operationName
public QueryTraverser.Builder operationName(java.lang.String 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
public QueryTraverser.Builder document(Document 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
public QueryTraverser.Builder variables(java.util.Map<java.lang.String,java.lang.Object> variables)
Raw variables used in the query.- Parameters:
variables- the variables to use- Returns:
- this builder
-
coercedVariables
public QueryTraverser.Builder coercedVariables(CoercedVariables coercedVariables)
Variables (already coerced) used in the query.- Parameters:
coercedVariables- the variables to use- Returns:
- this builder
-
root
public QueryTraverser.Builder root(Node 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
public QueryTraverser.Builder rootParentType(GraphQLCompositeType rootParentType)
The type of the parent of the root node. (Seeroot(Node)- Parameters:
rootParentType- the root parent type- Returns:
- this builder
-
fragmentsByName
public QueryTraverser.Builder fragmentsByName(java.util.Map<java.lang.String,FragmentDefinition> fragmentsByName)
Fragment by name map. Needs to be provided together with aroot(Node)androotParentType(GraphQLCompositeType)- Parameters:
fragmentsByName- the map of fragments- Returns:
- this builder
-
build
public QueryTraverser build()
- Returns:
- a built
QueryTraverserobject
-
-