diff --git a/CHANGELOG-v8.md b/CHANGELOG-v8.md index adfffe1e..95e89bd0 100644 --- a/CHANGELOG-v8.md +++ b/CHANGELOG-v8.md @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Order of DataType-methods for alphabetic order in schema - Set DebugFlag for error output to default - extract logging error formatter to new method -- extract save of module signature from `OxidEsales\GraphQL\Base\Infrastructure\ModuleSetup` to `OxidEsales\GraphQL\Base\Service\ModuleConfiguration` +- extract generation and save of module signature from `OxidEsales\GraphQL\Base\Infrastructure\ModuleSetup` to `OxidEsales\GraphQL\Base\Service\ModuleConfiguration` ### Added - Workflow trigger to update schema in documentation diff --git a/src/Framework/GraphQLQueryHandler.php b/src/Framework/GraphQLQueryHandler.php index 49dead91..a213f2b7 100644 --- a/src/Framework/GraphQLQueryHandler.php +++ b/src/Framework/GraphQLQueryHandler.php @@ -55,7 +55,7 @@ public function executeGraphQLQuery(): void $result = $this->executeQuery( $this->requestReader->getGraphQLRequestData() ); - $result->setErrorFormatter($this->getErrors()); + $result->setErrorFormatter($this->getErrorFormatter()); $this->responseWriter->renderJsonResponse( $result->toArray() ); @@ -110,7 +110,7 @@ public static function addError(Error $e): void self::$errors[] = $e; } - private function getErrors(): \Closure + private function getErrorFormatter(): \Closure { return function (Error $error) { $this->logger->error($error->getMessage(), [$error]); diff --git a/src/Infrastructure/ModuleSetup.php b/src/Infrastructure/ModuleSetup.php index d715d2b7..e668f8c1 100644 --- a/src/Infrastructure/ModuleSetup.php +++ b/src/Infrastructure/ModuleSetup.php @@ -33,7 +33,7 @@ public function __construct( public function runSetup(): void { - $this->moduleConfiguration->saveSignatureKey(); + $this->moduleConfiguration->generateAndSaveSignatureKey(); } /** diff --git a/src/Service/ModuleConfiguration.php b/src/Service/ModuleConfiguration.php index 14f04c55..e7833875 100644 --- a/src/Service/ModuleConfiguration.php +++ b/src/Service/ModuleConfiguration.php @@ -68,7 +68,7 @@ public function getSignatureKey(): string return $signature; } - public function saveSignatureKey(): void + public function generateAndSaveSignatureKey(): void { $this->moduleSettingService->saveString( static::SIGNATUREKEYNAME,