Inheritance: implements Youshido\GraphQL\Field\FieldInterface, use trait Youshido\GraphQL\Type\Traits\FieldsArgumentsAwareObjectTrait, use trait Youshido\GraphQL\Config\Traits\ResolvableObjectTrait, use trait Youshido\GraphQL\Type\Traits\AutoNameTrait
Beispiel #1
0
 public function __construct(FetcherInterface $fetcher)
 {
     $this->fetcher = $fetcher;
     $this->type = (new NodeInterfaceType())->setFetcher($this->fetcher);
     parent::__construct([]);
 }
Beispiel #2
0
 /**
  * @param string $typeName
  */
 public function __construct($typeName)
 {
     $this->typeName = $typeName;
     $config = ['type' => $this->getType(), 'name' => $this->getName(), 'resolve' => [$this, 'resolve']];
     parent::__construct($config);
 }