for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* BannerType.php
*/
namespace Examples\Blog\Schema;
use Youshido\GraphQL\Type\Config\TypeConfigInterface;
use Youshido\GraphQL\Type\NonNullType;
use Youshido\GraphQL\Type\Object\AbstractObjectType;
use Youshido\GraphQL\Type\Scalar\StringType;
class BannerType extends AbstractObjectType
{
public function build(TypeConfigInterface $config)
$config
->addField('title', new NonNullType(new StringType()))
->addField('summary', new StringType())
->addField('imageLink', new StringType());
}
public function resolve($value = null, $args = [], $type = null)
return DataProvider::getBanner(1);
public function getInterfaces()
return [new ContentBlockInterface()];