GraphQL\Examples\Blog\Type\CommentType::author PHP Méthode

author() public méthode

public author ( Comment $comment )
$comment GraphQL\Examples\Blog\Data\Comment
    public function author(Comment $comment)
    {
        if ($comment->isAnonymous) {
            return null;
        }
        return DataSource::findUser($comment->authorId);
    }