Skip to content

Commit 308578b

Browse files
havranfubhy
authored andcommitted
Always validate query if is present in original input. (#779)
1 parent b3d7ed6 commit 308578b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Plugin/GraphQL/Schemas/SchemaPluginBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ public function getServer() {
276276
});
277277

278278
$config->setValidationRules(function (OperationParams $params, DocumentNode $document, $operation) {
279-
if (isset($params->queryId)) {
279+
if (isset($params->queryId) && empty($params->getOriginalInput('query')) {
280280
// Assume that pre-parsed documents are already validated. This allows
281281
// us to store pre-validated query documents e.g. for persisted queries
282282
// effectively improving performance by skipping run-time validation.

0 commit comments

Comments
 (0)