Skip to content

Commit 2989d36

Browse files
authored
Merge pull request #342 from phpclassic/tareqtms-patch-2
Content type application/graphql is deprecated
2 parents ffce666 + 0a2e1a8 commit 2989d36

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)