for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Fubhy\GraphQL\Type\Directives;
/**
* Directives are used by the GraphQL runtime as a way of modifying execution
* behavior. Type system creators will usually not create these directly.
*/
abstract class Directive implements DirectiveInterface
{
* @var \Fubhy\GraphQL\Type\Directives\DirectiveInterface
protected static $include;
protected static $skip;
* @var string
protected $name;
protected $description;
* @var array
protected $arguments;
* @var \Fubhy\GraphQL\Type\Definition\Types\TypeInterface
protected $type;
* @var bool
protected $onOperation;
protected $onFragment;
protected $onField;
* @return \Fubhy\GraphQL\Type\Directives\DirectiveInterface
public static function includeDirective()
if (!isset(static::$include)) {
static::$include = new IncludeDirective();
}
return static::$include;
public static function skipDirective()
if (!isset(static::$skip)) {
static::$skip = new SkipDirective();
return static::$skip;
* {@inheritdoc}
public function getName()
return $this->name;
public function getDescription()
return $this->description;
public function getArguments()
return $this->arguments;
public function getType()
return $this->type;
public function onOperation()
return $this->onOperation;
public function onFragment()
return $this->onFragment;
public function onField()
return $this->onField;