Package graphql.analysis
Class QueryTransformer.Builder
- java.lang.Object
-
- graphql.analysis.QueryTransformer.Builder
-
- Enclosing class:
- QueryTransformer
@PublicApi public static class QueryTransformer.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description QueryTransformerbuild()QueryTransformer.BuilderfragmentsByName(java.util.Map<java.lang.String,FragmentDefinition> fragmentsByName)Fragment by name map.QueryTransformer.Builderoptions(QueryTraversalOptions options)Sets the options to use while traversingQueryTransformer.Builderroot(Node root)Specify the root node for the transformation.QueryTransformer.BuilderrootParentType(GraphQLCompositeType rootParentType)The type of the parent of the root node.QueryTransformer.Builderschema(GraphQLSchema schema)The schema used to identify the types of the query.QueryTransformer.Buildervariables(java.util.Map<java.lang.String,java.lang.Object> variables)Variables used in the query.
-
-
-
Method Detail
-
schema
public QueryTransformer.Builder schema(GraphQLSchema schema)
The schema used to identify the types of the query.- Parameters:
schema- the schema to use- Returns:
- this builder
-
variables
public QueryTransformer.Builder variables(java.util.Map<java.lang.String,java.lang.Object> variables)
Variables used in the query.- Parameters:
variables- the variables to use- Returns:
- this builder
-
root
public QueryTransformer.Builder root(Node root)
Specify the root node for the transformation.- Parameters:
root- the root node to use- Returns:
- this builder
-
rootParentType
public QueryTransformer.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 QueryTransformer.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
-
options
public QueryTransformer.Builder options(QueryTraversalOptions options)
Sets the options to use while traversing- Parameters:
options- the options to use- Returns:
- this builder
-
build
public QueryTransformer build()
-
-