<?php

declare (strict_types=1);
namespace Axtiva\FlexibleGraphql\Example\GraphQL\Resolver\Query;

use Axtiva\FlexibleGraphql\Example\GraphQL\ResolverArgs\Query\AddHourResolverArgs;
use Axtiva\FlexibleGraphql\Resolver\ResolverInterface;
use DateTimeImmutable;
use GraphQL\Type\Definition\ResolveInfo;

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * This is resolver for Query.addHour
 */
final class AddHourResolver implements ResolverInterface
{
    /**
     * @param $rootValue
     * @param AddHourResolverArgs $args
     * @param $context
     * @param ResolveInfo $info
     * @return ?DateTimeImmutable
     */
    public function __invoke($rootValue, $args, $context, ResolveInfo $info)
    {
        return $args->date->add(new \DateInterval('PT1H'));
    }
}