$args */ public function __invoke(null $_, array $args, GraphQLContext $context, ResolveInfo $resolveInfo): ?Like { $validated = $this->validated(ToggleLikeMutationValidator::class, $resolveInfo); /** @var Model&Likeable $likeable */ $likeable = Arr::first($validated); return $likeable->toggleLike(Auth::user()); } }