<?php

declare (strict_types=1);
namespace idoit\Module\SyneticsJdisc\Graphql\Schema\UnionResolveType;

use GraphQL\Type\Definition\ResolveInfo;
use Axtiva\FlexibleGraphql\Resolver\UnionResolveTypeInterface;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\GraphQLObjectType;
use idoit\Module\SyneticsJdisc\Graphql\Schema\Model\PasswordManagementRootNodeType;

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * and will be regenerated. Do not edit it manually
 * An unified interface to identify tree node data */
final class GraphQLNodeDataTypeResolver implements UnionResolveTypeInterface
{
    public function __invoke($model, $context, ResolveInfo $info)
    {
        if (isset($model)) {
            switch (get_class($model)) {
                case GraphQLObjectType::class:
                    return $info->schema->getType('GraphQLObject');
                case PasswordManagementRootNodeType::class:
                    return $info->schema->getType('PasswordManagementRootNode');
            }
        }
        return null;
    }
}