filter(fn ($value): bool => $value instanceof Model) ->values() ->all(); return ($this->response = Gate::inspect('viewAny', [Anime::class, $model, ...$args]))->allowed(); } /** * The arguments of the type. * * @return Argument[] */ public function arguments(): array { return [ new Argument(self::ARGUMENT_YEAR, Type::listOf(Type::nonNull(Type::int()))), ]; } /** * The base return type of the query. */ public function baseType(): AnimeYearType { return new AnimeYearType(); } /** * @return Collection */ public function resolve($root, array $args, $context, ResolveInfo $resolveInfo) { return App::make(AnimeYearsController::class) ->index($root, $args, $context, $resolveInfo); } }