public function sendQuery(): Response
    {
        $data = [
            'query' => $this->getGraphQL(),
            'variables' => $this->getVariables(),
        ];
        if ($this->operationName) {
            $data['operationName'] = $this->operationName;
        }

        $content = json_encode($data);
        $this->insulated = $this->config['insulated'] ?? false;

        $this->sendRequest(Request::METHOD_POST, $this->getEndpoint(), $this->getRequestsParameters(), [], $this->getServerParameters(), $content);

        return $this->response = $this->getResponse();
    }
public function sendQuery(): Response
    {
        $data = [
            'query' => $this->getGraphQL(),
            'variables' => $this->getVariables(),
        ];
        if ($this->operationName) {
            $data['operationName'] = $this->operationName;
        }

        $content = json_encode($data);
        $this->insulated = $this->config['insulated'] ?? false;

        $this->sendRequest(Request::METHOD_POST, $this->getEndpoint(), $this->getRequestsParameters(), [], $this->getServerParameters(), $content);

        return $this->response = $this->getResponse();
    }
public function sendQuery ( ) : Response { $ data = [ 'query' => $ this -> getGraphQL ( ) , 'variables' => $ this -> getVariables ( ) , ] ; if ( $ this -> operationName ) { $ data [ 'operationName' ] = $ this -> operationName ; } $ content = json_encode ( $ data ) ; $ this -> insulated = $ this -> config [ 'insulated' ] ?? false ; $ this -> sendRequest ( Request :: METHOD_POST , $ this -> getEndpoint ( ) , $ this -> getRequestsParameters ( ) , [ ] , $ this -> getServerParameters ( ) , $ content ) ; return $ this -> response = $ this -> getResponse ( ) ; }
Send the configured query or mutation with given variables

@return Response
Send the configured query or mutation with given variables