added working graphql 4 module and started materio_graphql

This commit is contained in:
2020-12-09 22:55:16 +01:00
parent 2fbba0fe7f
commit 2071a99ca2
16 changed files with 525 additions and 27 deletions

View File

@@ -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;
}
}