added working graphql 4 module and started materio_graphql
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types = 1);
|
||||
|
||||
namespace Drupal\materio_graphql\Wrappers\Response;
|
||||
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\graphql\GraphQL\Response\Response;
|
||||
|
||||
/**
|
||||
* Type of response used when an materiau is returned.
|
||||
*/
|
||||
class MateriauResponse extends Response {
|
||||
|
||||
/**
|
||||
* The materiau to be served.
|
||||
*
|
||||
* @var \Drupal\Core\Entity\EntityInterface|null
|
||||
*/
|
||||
protected $materiau;
|
||||
|
||||
/**
|
||||
* Sets the content.
|
||||
*
|
||||
* @param \Drupal\Core\Entity\EntityInterface|null $materiau
|
||||
* The materiau to be served.
|
||||
*/
|
||||
public function setMateriau(?EntityInterface $materiau): void {
|
||||
$this->materiau = $materiau;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the materiau to be served.
|
||||
*
|
||||
* @return \Drupal\Core\Entity\EntityInterface|null
|
||||
* The materiau to be served.
|
||||
*/
|
||||
public function materiau(): ?EntityInterface {
|
||||
return $this->materiau;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user