<?php

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

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

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * This is resolver for Query.dynamicSum
 */
final class DynamicSumResolver implements ResolverInterface
{
    /**
     * @param $rootValue
     * @param DynamicSumResolverArgs $args
     * @param $context
     * @param ResolveInfo $info
     * @return ?int
     */
    public function __invoke($rootValue, $args, $context, ResolveInfo $info)
    {
        return $args->x + $args['y'];
    }
}