for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is a part of GraphQL project.
*
* @author Alexandr Viniychuk <[email protected]>
* created: 4/23/17 11:09 PM
*/
namespace Examples\BookStore\Schema\Field\Book;
use Examples\BookStore\DataProvider;
use Examples\BookStore\Schema\Type\BookType;
use Youshido\GraphQL\Execution\ResolveInfo;
use Youshido\GraphQL\Field\AbstractField;
use Youshido\GraphQL\Type\AbstractType;
use Youshido\GraphQL\Type\ListType\ListType;
use Youshido\GraphQL\Type\Object\AbstractObjectType;
class RecentBooksField extends AbstractField
{
public function getType()
return new ListType(new BookType());
}
public function resolve($value, array $args, ResolveInfo $info)
return DataProvider::getBooks();