Files
animethemes-server/app/GraphQL/Schema/Relations/HasManyRelation.php
T

26 lines
544 B
PHP

<?php
declare(strict_types=1);
namespace App\GraphQL\Schema\Relations;
use App\Enums\GraphQL\PaginationType;
use GraphQL\Type\Definition\Type;
use Rebing\GraphQL\Support\Facades\GraphQL;
class HasManyRelation extends Relation
{
public function type(): Type
{
return Type::nonNull(Type::listOf(Type::nonNull(GraphQL::type($this->baseType->getName()))));
}
/**
* The pagination type if applicable.
*/
public function paginationType(): PaginationType
{
return PaginationType::SIMPLE;
}
}