Skip to content

Commit 0a2e1a8

Browse files
authored
1 parent ffce666 commit 0a2e1a8

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/HttpRequestGraphQL.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,10 @@ protected static function prepareRequest($httpHeaders = array(), $data = array()
4545
}
4646

4747
self::$httpHeaders = $httpHeaders;
48+
self::$httpHeaders['Content-type'] = 'application/json';
4849

4950
if (is_array($variables)) {
5051
self::$postDataGraphQL = json_encode(['query' => $data, 'variables' => $variables]);
51-
self::$httpHeaders['Content-type'] = 'application/json';
52-
} else {
53-
self::$httpHeaders['Content-type'] = 'application/graphql';
5452
}
5553
}
5654

0 commit comments

Comments
 (0)