Adds DisableIntrospection validation rule to the DocumentValidator (default: disabled)

This commit is contained in:
Laurin Quast 2017-06-17 14:51:38 +02:00
parent 1c62f554ae
commit 719a438628

View File

@ -25,6 +25,7 @@ use GraphQL\Utils;
use GraphQL\Utils\TypeInfo;
use GraphQL\Validator\Rules\ArgumentsOfCorrectType;
use GraphQL\Validator\Rules\DefaultValuesOfCorrectType;
use GraphQL\Validator\Rules\DisableIntrospection;
use GraphQL\Validator\Rules\FieldsOnCorrectType;
use GraphQL\Validator\Rules\FragmentsOnCompositeTypes;
use GraphQL\Validator\Rules\KnownArgumentNames;
@ -100,6 +101,7 @@ class DocumentValidator
'UniqueInputFieldNames' => new UniqueInputFieldNames(),
// Query Security
'DisableIntrospection' => new DisableIntrospection(DisableIntrospection::DISABLED), // DEFAULT DISABLED
'QueryDepth' => new QueryDepth(QueryDepth::DISABLED), // default disabled
'QueryComplexity' => new QueryComplexity(QueryComplexity::DISABLED), // default disabled
];