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

26 lines
550 B
PHP

<?php
declare(strict_types=1);
namespace App\GraphQL\Schema\Fields\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()->name()))));
}
/**
* The pagination type if applicable.
*/
public function paginationType(): PaginationType
{
return PaginationType::SIMPLE;
}
}