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) {
3030 if (graphQLRequests .getRequests ().isEmpty ()) {
3131 throw new IllegalArgumentException ("At least one GraphQL request should be supplied" );
3232 }
33- GraphQLOperation operation = GraphQLOperation . QUERY ;
33+ GraphQLOperation operation = graphQLRequests . getRequests (). get ( 0 ). getRequest (). getOperationType () ;
3434 StringBuilder queryBuilder = new StringBuilder ();
3535 for (GraphQLRequest request : graphQLRequests .getRequests ()) {
3636 if (request == null || request .getRequest () == null ) {
@@ -40,7 +40,6 @@ public static String toHttpJsonBody(GraphQLRequests graphQLRequests) {
4040 throw new IllegalArgumentException ("Only operations of the same type (query/mutation/subscription) can be executed at once" );
4141 }
4242 queryBuilder .append (buildQuery (request )).append (" " );
43- operation = request .getRequest ().getOperationType ();
4443 }
4544 return jsonQuery (operationWrapper (queryBuilder .toString (), operation ));
4645 }
You can’t perform that action at this time.
0 commit comments