@@ -38,7 +38,7 @@ class ProductsResolver implements ResolverInterface, AliasedInterface
      */
     public function resolve(): array
     {
-        return $this->productOnCurrentDomainFacade->getAllListableProducts();
+        return $this->productOnCurrentDomainFacade->getAllOfferedProducts();
     }
 
     /**
<?php

declare(strict_types=1);

namespace Shopsys\FrontendApiBundle\Model\Resolver\Products;

use Overblog\GraphQLBundle\Definition\Resolver\AliasedInterface;
use Overblog\GraphQLBundle\Definition\Resolver\ResolverInterface;
use Shopsys\FrameworkBundle\Component\Domain\Domain;
use Shopsys\FrameworkBundle\Model\Product\ProductOnCurrentDomainFacade;

class ProductsResolver implements ResolverInterface, AliasedInterface
{
    /**
     * @var \Shopsys\FrameworkBundle\Model\Product\ProductOnCurrentDomainFacade
     */
    protected $productOnCurrentDomainFacade;

    /**
     * @var \Shopsys\FrameworkBundle\Component\Domain\Domain
     */
    protected $domain;

    /**
     * @param \Shopsys\FrameworkBundle\Model\Product\ProductOnCurrentDomainFacade $productOnCurrentDomainFacade
     * @param \Shopsys\FrameworkBundle\Component\Domain\Domain $domain
     */
    public function __construct(
        ProductOnCurrentDomainFacade $productOnCurrentDomainFacade,
        Domain $domain
    ) {
        $this->productOnCurrentDomainFacade = $productOnCurrentDomainFacade;
        $this->domain = $domain;
    }

    /**
     * @return \Shopsys\FrameworkBundle\Model\Product\Product[]
     */
    public function resolve(): array
    {
        return $this->productOnCurrentDomainFacade->getAllListableProducts();
    }

    /**
     * @return string[]
     */
    public static function getAliases(): array
    {
        return [
            'resolve' => 'products',
        ];
    }
}

According to previous changes I'm just curious if we want to use `ProductOnCurrentDomainFacade` only. It will make sense to me stick to the interface `ProductOnCurrentDomainFacadeInterface` and have the same functionality implementent even in `ProductOnCurrentDomainElasticFacade`. Then anyone could just switch the implementation in `services.yml`. But this is not the scope of this PR maybe we should create an issue or new PR for this. What do you think?