[DataHub] How to return AssetObject in custom operator?

Hi,

I have custom operator, where i want to return asset object. For now i can see that i can return some basic data types like string, float, int, but I can’t find any simple way to return asset object.

I tried something like this:

class ConfiguratorProductThumbnail extends Base
{
    /**
     * @param $typeName
     * @param $nodeDef
     * @param null $class
     * @param null $container
     * @param array $params
     */
    public function getGraphQlType($typeName, $nodeDef, $class = null, $container = null, $params = [])
    {
        return $this->graphQlService->buildAssetType('asset');
    }

    /**
     * @param $attributes
     * @param null $class
     * @param null $container
     *
     */
    public function getFieldType($attributes, $class = null, $container = null)
    {
        return $this->graphQlService->buildAssetType('asset');
    }
}

and

<?php

namespace OffagBundle\DataHub\GraphQL\Query\Operator;

use Exception;
use GraphQL\Type\Definition\ResolveInfo;
use Pimcore\Bundle\DataHubBundle\GraphQL\ElementDescriptor;
use Pimcore\Bundle\DataHubBundle\GraphQL\Query\Operator\AbstractOperator;
use Pimcore\Model\Asset\Image\Thumbnail;
use Pimcore\Model\DataObject\Fieldcollection;
use Pimcore\Model\DataObject\Fieldcollection\Data\ProductImage;
use Pimcore\Model\Element\ElementInterface;
use stdClass;

class ConfiguratorProductThumbnail extends AbstractOperator
{
    private $configuratorProductThumbnailConfig;

    /**
     * Thumbnail constructor.
     *
     * @param array $config
     * @param null $context
     */
    public function __construct(array $config = [], $context = null)
    {
        parent::__construct($config, $context);

        $this->configuratorProductThumbnailConfig = $config['configuratorProductThumbnailConfig'];
    }

    /**
     * @param ElementInterface $element
     * @param ResolveInfo|null $resolveInfo
     *
     * @return stdClass|null
     * @throws Exception
     */
    public function getLabeledValue($element, ResolveInfo $resolveInfo = null)
    {
        $result = new stdClass();
        $result->label = $this->label;
        if (!$this->configuratorProductThumbnailConfig) {
            return $result;
        }

        // Pimcore 5/6 compatibility
        $children = method_exists($this, 'getChildren') ? $this->getChildren() : $this->getChilds();

        if (!$children) {
            return $result;
        } else {
            $c = $children[0];


            $valueResolver = $this->getGraphQlService()->buildValueResolverFromAttributes($c);

            [...]

            $result->value = $mediaItem->getImage()->getThumbnail('configurator_product_image', false)->getAsset();
            return $result;
        }
    }
}

But get this:

Am I doing something wrong or data-hub don’t support other data types then some basic like strings and ints?