Skip to content

Commit 0f08bf8

Browse files
authored
Merge pull request #343 from svishalgarg/master
Fixed 400 Bad Request Api Issue with Graphql
2 parents 2989d36 + 49deba8 commit 0f08bf8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/HttpRequestGraphQL.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ protected static function prepareRequest($httpHeaders = array(), $data = array()
4949

5050
if (is_array($variables)) {
5151
self::$postDataGraphQL = json_encode(['query' => $data, 'variables' => $variables]);
52+
} else {
53+
self::$postDataGraphQL = json_encode(['query' => $data]);
5254
}
5355
}
5456

0 commit comments

Comments
 (0)