Skip to content

Commit 5f4b524

Browse files
authored
Set header to accept v4 API
1 parent 26121e4 commit 5f4b524

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/Github/Api/GraphQL.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Github\Api;
44

5+
use AcceptHeaderTrait;
56
/**
67
* GraphQL API.
78
*
@@ -12,13 +13,15 @@
1213
*/
1314
class GraphQL extends AbstractApi
1415
{
16+
use AcceptHeaderTrait;
1517
/**
1618
* @param string $query
1719
*
1820
* @return array
1921
*/
2022
public function execute($query)
2123
{
24+
$this->acceptHeader = 'application/vnd.github.v4+json';
2225
$params = array(
2326
'query' => $query
2427
);

0 commit comments

Comments
 (0)