GraphQL\Examples\Blog\Type\CommentType::__construct PHP Method

__construct() public method

public __construct ( )
    public function __construct()
    {
        $config = ['name' => 'Comment', 'fields' => function () {
            return ['id' => Types::id(), 'author' => Types::user(), 'parent' => Types::comment(), 'isAnonymous' => Types::boolean(), 'replies' => ['type' => Types::listOf(Types::comment()), 'args' => ['after' => Types::int(), 'limit' => ['type' => Types::int(), 'defaultValue' => 5]]], 'totalReplyCount' => Types::int(), Types::htmlField('body')];
        }, 'resolveField' => function ($value, $args, $context, ResolveInfo $info) {
            if (method_exists($this, $info->fieldName)) {
                return $this->{$info->fieldName}($value, $args, $context, $info);
            } else {
                return $value->{$info->fieldName};
            }
        }];
        parent::__construct($config);
    }