From 692456d892c373d35bbcfa02793a97334de83599 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Wed, 16 Dec 2020 19:01:29 +1300 Subject: [PATCH] Remove Schema->getSignature() It's not used anywhere, and is "false advertisement" since there's a whole lot of instance state which it doesn't cover (e.g. procedural addType() calls, anything in SchemaContext). If there was a reason to keep it, we shouldn't return a potentially huge string as a signature, but rather use a hash. This would also avoid accidentally disclosing potentially sensitive (serialised) data in cache keys etc. --- src/Schema/Schema.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/Schema/Schema.php b/src/Schema/Schema.php index 88d77e7d8..ce07ae879 100644 --- a/src/Schema/Schema.php +++ b/src/Schema/Schema.php @@ -31,7 +31,6 @@ use SilverStripe\GraphQL\Schema\Interfaces\SchemaUpdater; use SilverStripe\GraphQL\Schema\Interfaces\SchemaValidator; use SilverStripe\GraphQL\Schema\Interfaces\SettingsProvider; -use SilverStripe\GraphQL\Schema\Interfaces\SignatureProvider; use SilverStripe\GraphQL\Schema\Interfaces\TypePlugin; use SilverStripe\GraphQL\Schema\Registry\SchemaModelCreatorRegistry; use SilverStripe\GraphQL\Schema\Type\Enum; @@ -54,7 +53,7 @@ * Applies plugins, validates, and persists to code. * */ -class Schema implements ConfigurationApplier, SchemaValidator, SignatureProvider +class Schema implements ConfigurationApplier, SchemaValidator { use Injectable; use Configurable; @@ -1027,15 +1026,6 @@ public function getUnions(): array return $this->unions; } - /** - * @return string - * @throws SchemaBuilderException - */ - public function getSignature(): string - { - return serialize($this->getSchemaConfiguration()); - } - /** * @return array */