materio_simplenews & materio_graphql fix

This commit is contained in:
2026-09-23 14:57:56 +02:00
parent c38d01ee2b
commit 217b08290f
6 changed files with 0 additions and 472 deletions
@@ -4,7 +4,6 @@ namespace Drupal\materio_graphql\Plugin\GraphQL\SchemaExtension;
use Drupal\graphql\GraphQL\ResolverBuilder;
use Drupal\graphql\GraphQL\ResolverRegistryInterface;
use Drupal\graphql\GraphQL\Response\ResponseInterface;
use Drupal\graphql\Plugin\GraphQL\SchemaExtension\SdlSchemaExtensionPluginBase;
use Drupal\Core\Url;
// use CommerceGuys\Addressing\Country\CountryRepository;
@@ -103,12 +102,6 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
$this->addVideolink($registry, $builder);
$this->addImage($registry, $builder);
// Response type resolver.
$registry->addTypeResolver('Response', [
__CLASS__,
'resolveResponse',
]);
}
// ___ _
@@ -1617,24 +1610,5 @@ class MaterioSchemaExtension extends SdlSchemaExtensionPluginBase {
})
));
}
/**
* Resolves the response type.
*
* @param \Drupal\graphql\GraphQL\Response\ResponseInterface $response
* Response object.
*
* @return string
* Response type.
*
* @throws \Exception
* Invalid response type.
*/
public static function resolveResponse(ResponseInterface $response): string {
// Resolve content response.
if ($response instanceof MateriauResponse) {
return 'MateriauResponse';
}
throw new \Exception('Invalid response type.');
}
}