Skip to content

Commit 758f2aa

Browse files
committed
B2B-2606: Graphql Parser called at least 3 times per request
1 parent 7c85cdb commit 758f2aa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dev/tests/integration/testsuite/Magento/GraphQl/Controller/HttpRequestValidator/HttpVerbValidatorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
class HttpVerbValidatorTest extends TestCase
1818
{
1919
/**
20-
* @var HttpVerbValidator|MockObject
20+
* @var HttpVerbValidator
2121
*/
2222
private $httpVerbValidator;
2323

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function parse(string $query): DocumentNode
3232
{
3333
$cacheKey = sha1($query);
3434
if (!isset($this->parsedQueries[$cacheKey])) {
35-
$this->parsedQueries[$cacheKey] = Parser::parse(new Source($query ?: '', 'GraphQL'));
35+
$this->parsedQueries[$cacheKey] = Parser::parse(new Source($query, 'GraphQL'));
3636
}
3737
return $this->parsedQueries[$cacheKey];
3838
}

0 commit comments

Comments
 (0)