File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed
src/main/java/com/kobylynskyi/graphql/codegen/model/graphql Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ public static String toHttpJsonBody(GraphQLRequests graphQLRequests) {
30
30
if (graphQLRequests .getRequests ().isEmpty ()) {
31
31
throw new IllegalArgumentException ("At least one GraphQL request should be supplied" );
32
32
}
33
- GraphQLOperation operation = GraphQLOperation . QUERY ;
33
+ GraphQLOperation operation = graphQLRequests . getRequests (). get ( 0 ). getRequest (). getOperationType () ;
34
34
StringBuilder queryBuilder = new StringBuilder ();
35
35
for (GraphQLRequest request : graphQLRequests .getRequests ()) {
36
36
if (request == null || request .getRequest () == null ) {
@@ -40,7 +40,6 @@ public static String toHttpJsonBody(GraphQLRequests graphQLRequests) {
40
40
throw new IllegalArgumentException ("Only operations of the same type (query/mutation/subscription) can be executed at once" );
41
41
}
42
42
queryBuilder .append (buildQuery (request )).append (" " );
43
- operation = request .getRequest ().getOperationType ();
44
43
}
45
44
return jsonQuery (operationWrapper (queryBuilder .toString (), operation ));
46
45
}
You can’t perform that action at this time.
0 commit comments