private function request($query, $variables, $headers)
    {

        $ch = curl_init();

        curl_setopt($ch, CURLOPT_URL, $this->url);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['query' => $query, 'variables' => $variables]));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array_merge($headers, [
            "X-Token: {$this->token}",
            "Content-Type: application/json;charset=utf-8"
        ]));
        $output = curl_exec($ch);

        curl_close($ch);

        return $output;
    }
private function request($query, $variables, $headers)
    {

        $ch = curl_init();

        curl_setopt($ch, CURLOPT_URL, $this->url);
        curl_setopt($ch, CURLOPT_HEADER, 0);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(['query' => $query, 'variables' => $variables]));
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_HTTPHEADER, array_merge($headers, [
            "X-Token: {$this->token}",
            "Content-Type: application/json;charset=utf-8"
        ]));
        $output = curl_exec($ch);

        curl_close($ch);

        return $output;
    }
private function request ( $ query , $ variables , $ headers ) { $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_URL , $ this -> url ) ; curl_setopt ( $ ch , CURLOPT_HEADER , 0 ) ; curl_setopt ( $ ch , CURLOPT_POST , 1 ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , json_encode ( [ 'query' => $ query , 'variables' => $ variables ] ) ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , 0 ) ; curl_setopt ( $ ch , CURLOPT_HTTPHEADER , array_merge ( $ headers , [ "X-Token: {$this->token}" , "Content-Type: application/json;charset=utf-8" ] ) ) ; $ output = curl_exec ( $ ch ) ; curl_close ( $ ch ) ; return $ output ; }
Make a GraphQL Request and get the raw response.

@param string $query
@param array $variables
@param array $headers

@return mixed
Make a GraphQL Request and get the raw response .