<?php

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

use Axtiva\FlexibleGraphql\Generator\Exception\NotImplementedResolver;
use GraphQL\Type\Definition\ResolveInfo;
use Axtiva\FlexibleGraphql\Resolver\DirectiveResolverInterface;
use Axtiva\FlexibleGraphql\Example\GraphQL\DirectiveArgs\PlusXDirectiveArgs;

/**
 * This code is @generated by axtiva/flexible-graphql-php
 * Resolver for executable directive @plusX
 */
final class PlusXDirective implements DirectiveResolverInterface
{
    /**
     * @param callable $next
     * @param PlusXDirectiveArgs $directiveArgs
     * @param $rootValue
     * @param $args
     * @param $context
     * @param ResolveInfo $info
     * @return mixed
     */
    public function __invoke(callable $next, $directiveArgs, $rootValue, $args, $context, ResolveInfo $info)
    {
        return $next($rootValue, $args, $context, $info) + $directiveArgs->x;
    }
}