outline-8.x-1.x-dev/modules/outline_graphql/src/Plugin/GraphQL/DataProducer/Outline/ServerUuid.php
modules/outline_graphql/src/Plugin/GraphQL/DataProducer/Outline/ServerUuid.php
<?php
namespace Drupal\outline_graphql\Plugin\GraphQL\DataProducer\Outline;
use Drupal\Core\Entity\EntityInterface;
use Drupal\graphql\Plugin\GraphQL\DataProducer\DataProducerPluginBase;
use Drupal\outline\Entity\Outline;
/**
* @DataProducer(
* id = "server_uuid",
* name = @Translation("Server UUID"),
* description = @Translation("Returns the Sever UUID."),
* produces = @ContextDefinition("string",
* label = @Translation("Server UUID")
* )
* )
*/
class ServerUuid extends DataProducerPluginBase {
/**
* @param \Drupal\outline\Entity\Outline $outline
*
* @return string
*/
public function resolve() {
$server_uuid = \Drupal::config('system.site')->get('uuid');
return $server_uuid;
}
}
