diff --git a/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GraphQLController.java b/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GraphQLController.java index f316e64..e941115 100644 --- a/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GraphQLController.java +++ b/graphql-spqr-spring-boot-autoconfigure/src/main/java/io/leangen/graphql/spqr/spring/web/GraphQLController.java @@ -37,7 +37,7 @@ public Object executeJsonPost(@RequestBody GraphQLRequest requestBody, R request) { String query = requestParams.getQuery() == null ? requestBody.getQuery() : requestParams.getQuery(); String operationName = requestParams.getOperationName() == null ? requestBody.getOperationName() : requestParams.getOperationName(); - Map variables = requestParams.getVariables() == null ? requestBody.getVariables() : requestParams.getVariables(); + Map variables = requestParams.getVariables().isEmpty() ? requestBody.getVariables() : requestParams.getVariables(); return executor.execute(graphQL, new GraphQLRequest(query, operationName, variables), request); }