Skip to content

Commit b0db11f

Browse files
committed
B2B-2606: Graphql Parser called at least 3 times per request
1 parent d093cc7 commit b0db11f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/code/Magento/GraphQl/Helper/Query/Logger/LogData.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private function gatherResponseInformation(HttpResponse $response) : array
133133
* @throws SyntaxError
134134
* @throws \Exception
135135
*/
136-
private function getFieldCount($query): int
136+
private function getFieldCount(DocumentNode|string $query): int
137137
{
138138
if (!empty($query)) {
139139
$totalFieldCount = 0;

lib/internal/Magento/Framework/GraphQl/Query/Fields.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(QueryParser $queryParser = null)
4343
*
4444
* @return void
4545
*/
46-
public function setQuery($query, array $variables = null)
46+
public function setQuery(DocumentNode|string $query, array $variables = null)
4747
{
4848
$queryFields = [];
4949
try {

lib/internal/Magento/Framework/GraphQl/Query/QueryComplexityLimiter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function execute(): void
9090
* @param DocumentNode|string $query
9191
* @throws GraphQlInputException
9292
*/
93-
public function validateFieldCount($query): void
93+
public function validateFieldCount(DocumentNode|string $query): void
9494
{
9595
if (!empty($query)) {
9696
$totalFieldCount = 0;

lib/internal/Magento/Framework/GraphQl/Query/QueryProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public function __construct(
7373
*/
7474
public function process(
7575
Schema $schema,
76-
$source,
76+
DocumentNode|string $source,
7777
ContextInterface $contextValue = null,
7878
array $variableValues = null,
7979
string $operationName = null

0 commit comments

Comments
 (0)