<?php

declare (strict_types=1);
namespace PoPCMSSchema\PageMutations\TypeResolvers\UnionType;

use PoPCMSSchema\PageMutations\RelationalTypeDataLoaders\UnionType\PageUpdateMutationErrorPayloadUnionTypeDataLoader;
use PoP\ComponentModel\RelationalTypeDataLoaders\RelationalTypeDataLoaderInterface;
/** @internal */
class PageUpdateMutationErrorPayloadUnionTypeResolver extends \PoPCMSSchema\PageMutations\TypeResolvers\UnionType\AbstractPageUpdateMutationErrorPayloadUnionTypeResolver
{
    private ?PageUpdateMutationErrorPayloadUnionTypeDataLoader $pageUpdateMutationErrorPayloadUnionTypeDataLoader = null;
    protected final function getPageUpdateMutationErrorPayloadUnionTypeDataLoader() : PageUpdateMutationErrorPayloadUnionTypeDataLoader
    {
        if ($this->pageUpdateMutationErrorPayloadUnionTypeDataLoader === null) {
            /** @var PageUpdateMutationErrorPayloadUnionTypeDataLoader */
            $pageUpdateMutationErrorPayloadUnionTypeDataLoader = $this->instanceManager->getInstance(PageUpdateMutationErrorPayloadUnionTypeDataLoader::class);
            $this->pageUpdateMutationErrorPayloadUnionTypeDataLoader = $pageUpdateMutationErrorPayloadUnionTypeDataLoader;
        }
        return $this->pageUpdateMutationErrorPayloadUnionTypeDataLoader;
    }
    public function getTypeName() : string
    {
        return 'PageUpdateMutationErrorPayloadUnion';
    }
    public function getTypeDescription() : ?string
    {
        return $this->__('Union of \'Error Payload\' types when updating a page (using nested mutations)', 'page-mutations');
    }
    public function getRelationalTypeDataLoader() : RelationalTypeDataLoaderInterface
    {
        return $this->getPageUpdateMutationErrorPayloadUnionTypeDataLoader();
    }
}
