Skip to content

Commit 719a438

Browse files
committed
Adds DisableIntrospection validation rule to the DocumentValidator (default: disabled)
1 parent 1c62f55 commit 719a438

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Validator/DocumentValidator.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use GraphQL\Utils\TypeInfo;
2626
use GraphQL\Validator\Rules\ArgumentsOfCorrectType;
2727
use GraphQL\Validator\Rules\DefaultValuesOfCorrectType;
28+
use GraphQL\Validator\Rules\DisableIntrospection;
2829
use GraphQL\Validator\Rules\FieldsOnCorrectType;
2930
use GraphQL\Validator\Rules\FragmentsOnCompositeTypes;
3031
use GraphQL\Validator\Rules\KnownArgumentNames;
@@ -100,6 +101,7 @@ public static function defaultRules()
100101
'UniqueInputFieldNames' => new UniqueInputFieldNames(),
101102

102103
// Query Security
104+
'DisableIntrospection' => new DisableIntrospection(DisableIntrospection::DISABLED), // DEFAULT DISABLED
103105
'QueryDepth' => new QueryDepth(QueryDepth::DISABLED), // default disabled
104106
'QueryComplexity' => new QueryComplexity(QueryComplexity::DISABLED), // default disabled
105107
];

0 commit comments

Comments
 (0)