$args */ public function __invoke(null $_, array $args, GraphQLContext $context, ResolveInfo $resolveInfo): ?WatchHistory { $validated = $this->validated(WatchMutationValidator::class, $resolveInfo); $validated = [ WatchHistory::ATTRIBUTE_ENTRY => Arr::integer($args, 'entryId'), WatchHistory::ATTRIBUTE_VIDEO => Arr::integer($args, 'videoId'), WatchHistory::ATTRIBUTE_USER => Auth::id(), ]; return WatchHistory::query()->create($validated); } }