@@ -25,7 +25,8 @@ public class GraphQL {
2525
2626
2727 private final GraphQLSchema graphQLSchema ;
28- private final ExecutionStrategy executionStrategy ;
28+ private final ExecutionStrategy queryStrategy ;
29+ private final ExecutionStrategy mutationStrategy ;
2930
3031 private static final Logger log = LoggerFactory .getLogger (GraphQL .class );
3132
@@ -38,22 +39,35 @@ public class GraphQL {
3839 */
3940 public GraphQL (GraphQLSchema graphQLSchema ) {
4041 //noinspection deprecation
41- this (graphQLSchema , null );
42+ this (graphQLSchema , null , null );
4243 }
4344
4445
4546 /**
4647 * A GraphQL object ready to execute queries
4748 *
4849 * @param graphQLSchema the schema to use
49- * @param executionStrategy the execution strategy to use
50+ * @param queryStrategy the execution strategy to use
5051 *
5152 * @deprecated use the {@link #newObject(GraphQLSchema)} builder instead. This will be removed in a future version.
5253 */
53- @ SuppressWarnings ("DeprecatedIsStillUsed" )
54- public GraphQL (GraphQLSchema graphQLSchema , ExecutionStrategy executionStrategy ) {
54+ public GraphQL (GraphQLSchema graphQLSchema , ExecutionStrategy queryStrategy ) {
55+ //noinspection deprecation
56+ this (graphQLSchema , queryStrategy , null );
57+ }
58+
59+ /**
60+ * A GraphQL object ready to execute queries
61+ *
62+ * @param graphQLSchema the schema to use
63+ * @param queryStrategy the execution strategy to use
64+ *
65+ * @deprecated use the {@link #newObject(GraphQLSchema)} builder instead. This will be removed in a future version.
66+ */
67+ public GraphQL (GraphQLSchema graphQLSchema , ExecutionStrategy queryStrategy , ExecutionStrategy mutationStrategy ) {
5568 this .graphQLSchema = graphQLSchema ;
56- this .executionStrategy = executionStrategy ;
69+ this .queryStrategy = queryStrategy ;
70+ this .mutationStrategy = mutationStrategy ;
5771 }
5872
5973 /**
@@ -127,7 +141,7 @@ public ExecutionResult execute(String requestString, String operationName, Objec
127141 if (validationErrors .size () > 0 ) {
128142 return new ExecutionResultImpl (validationErrors );
129143 }
130- Execution execution = new Execution (executionStrategy );
144+ Execution execution = new Execution (queryStrategy , mutationStrategy );
131145 return execution .execute (graphQLSchema , context , document , operationName , arguments );
132146 }
133147
0 commit comments