<?php

declare(strict_types=1);

namespace App\GraphQL\Schema\Queries\Models\Pagination\Wiki;

use App\GraphQL\Argument\Argument;
use App\GraphQL\Argument\SearchArgument;
use App\GraphQL\Schema\Queries\Models\Pagination\EloquentPaginationQuery;
use App\GraphQL\Schema\Types\Wiki\SeriesType;

class SeriesPaginationQuery extends EloquentPaginationQuery
{
    public function name(): string
    {
        return 'seriesPagination';
    }

    public function description(): string
    {
        return 'Returns a listing of series resources given fields.';
    }

    /**
     * The base return type of the query.
     */
    public function baseType(): SeriesType
    {
        return new SeriesType();
    }

    /**
     * The arguments of the class resolve as customs class helper.
     *
     * @return Argument[]
     */
    public function arguments(): array
    {
        return [
            ...parent::arguments(),

            new SearchArgument(),
        ];
    }
}
