mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-30 18:48:56 +02:00
35 lines
786 B
PHP
35 lines
786 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\GraphQL\Schema\Fields\Search;
|
|
|
|
use App\Contracts\GraphQL\Fields\DisplayableField;
|
|
use App\GraphQL\Schema\Fields\Field;
|
|
use App\GraphQL\Schema\Types\Wiki\StudioType;
|
|
use GraphQL\Type\Definition\Type;
|
|
use Rebing\GraphQL\Support\Facades\GraphQL;
|
|
|
|
class SearchStudiosField extends Field implements DisplayableField
|
|
{
|
|
public function __construct()
|
|
{
|
|
parent::__construct('studios', nullable: false);
|
|
}
|
|
|
|
public function description(): string
|
|
{
|
|
return 'The studio results of the search';
|
|
}
|
|
|
|
public function baseType(): Type
|
|
{
|
|
return Type::listOf(Type::nonNull(GraphQL::type(new StudioType()->getName())));
|
|
}
|
|
|
|
public function canBeDisplayed(): bool
|
|
{
|
|
return true;
|
|
}
|
|
}
|