mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-25 16:24:35 +02:00
26 lines
544 B
PHP
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;
|
|
}
|
|
}
|