<?php

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

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

/**
 * 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;
    }
}