Resolve the field directive.

@param  \Nuwave\Lighthouse\Schema\Values\FieldValue  $fieldValue
@param  \Closure  $next
@return \Nuwave\Lighthouse\Schema\Values\FieldValue
326175
public function handleField(FieldValue $fieldValue, Closure $next): FieldValue
    {
        if ($this->directiveHasArgument('resolver')) {
            [$className, $methodName] = $this->getMethodArgumentParts('resolver');

            $namespacedClassName = $this->namespaceClassName(
                $className,
                $fieldValue->defaultNamespacesForParent()
            );

            $resolver = Utils::constructResolver($namespacedClassName, $methodName);
        } else {
            $resolver = function (int $childrenComplexity, array $args): int {
                $complexity = Arr::get(
                    $args,
                    'first',
                    Arr::get($args, config('lighthouse.pagination_amount_argument'), 1)
                );

                return $childrenComplexity * $complexity;
            };
        }

        return $next(
            $fieldValue->setComplexity($resolver)
        );
    }
611914
public function handle($request, Closure $next)
    {
        $paginationKey = config('pagination.key');

        $request->offsetSet($paginationKey, $request->paginationCount());

        return $next($request);
    }
239646
public function addFieldValue(FieldValue $fieldValue)
    {
        if (!$this->fieldValues->contains($fieldValue)) {
            $this->fieldValues->add($fieldValue);
        }
    }
873539
public function handle(Request $request, \Closure $next)
	{
		$this->buildRepository($request);

		return $next($request);
	}
1311628
public function serialize(FieldValue $fieldValue, array $options = [])
    {
        $serialized = [
            'id' => $fieldValue->getUuid(),
        ];

        if (in_array(Options::SERIALIZE_MINIMAL, $options)) {
            $serialized = array_merge($serialized, [
                'field' => [
                    'id' => $fieldValue->getField()->getUuid(),
                ],
                'fieldFacetValue' => $this->fieldFacetValueSerializer->serialize($fieldValue->getFieldFacetValue(), ['minimal']),
            ]);
        } else {
            $serialized = array_merge($serialized, [
                'field' => $this->fieldSerializer->serialize($fieldValue->getField(), [Options::SERIALIZE_MINIMAL]),
                'fieldFacetValue' => $this->fieldFacetValueSerializer->serialize($fieldValue->getFieldFacetValue(), ['minimal']),
            ]);
        }

        return $serialized;
    }
170132
public function handle(Request $request, Closure $next)
    {
        $badges = Collection::make([]);

        $this->collectBadges(function ($fileInfo) use ($badges) {
            $this->resolveClass($fileInfo, function ($badge) use ($badges) {
                $badges->push($badge);
            });
        });

        $this->registerCollection(
            $this->sortCollection($badges)
        );

        return $next($request);
    }
341479
public function handle( $request, Closure $next )
	{
		$response = $next( $request );

		foreach ( $this->cookies->getQueuedCookies() as $cookie )
			$response->headers->setCookie( $cookie );

		return $response;
	}
209437
public function handle($request, Closure $next)
    {

        if ($request->session()->has('language')) {
            $local = $request->session()->get('language', config('app.locale'));
            app()->setLocale($local);
        }

        return $next($request);
    }
658419
private function getterSetter($field, $fieldValue)
    {
        if ($fieldValue == null) {
            return $this->$field;
        }

        $this->$field = $fieldValue;

        return $this;
    }
1027237
public function handle($request, Closure $next)
    {
        $locale = $this->localizer->detect();

        if ($locale) {
            $this->localizer->store($locale);
        }

        return $next($request);
    }
1054986
public function handle($request, Closure $next)
    {
        $this->credentials->getThrottleProvider()->enable();

        return $next($request);
    }
986384
public function handle($request, Closure $next)
    {
        \App::setLocale(\Routelocale::getLocaleFromRoute());
        return $next($request);;
    }
888282
public function handle($request, Closure $next)
    {
        if ($class = AdminManager::getAdminInstance()) {
            $class = get_class($class);
        }

        if (!$this->permissions->check($class)) {
            return $this->permissions->denied($class);
        }

        return $next($request);
    }
37368
public function handleField(FieldValue $value, Closure $next): FieldValue
    {
        $value = $next($value);
        $resolver = $value->getResolver();
        $subscriptionField = $this->directiveArgValue('subscription');
        $shouldQueue = $this->directiveArgValue('shouldQueue');

        return $value->setResolver(function () use ($resolver, $subscriptionField, $shouldQueue) {
            $resolved = call_user_func_array($resolver, func_get_args());

            if ($resolved instanceof Deferred) {
                $resolved->then(function ($root) use ($subscriptionField, $shouldQueue) {
                    Subscription::broadcast($subscriptionField, $root, $shouldQueue);
                });
            } else {
                Subscription::broadcast($subscriptionField, $resolved, $shouldQueue);
            }

            return $resolved;
        });
    }
1286675
public function createField($fieldName, $defaultValue = null)
    {
        /** @var OptionsetField $field */
        $field = parent::createField($fieldName, $defaultValue);
        $field->setSource($this->Options()->map()->toArray());
        $field->setValue($defaultValue);
        return $field;
    }
1119153
public function handle(Request $request, Closure $next)
    {
        $request = $this->processRequest($request);
        return $next($request);
    }
491073
public function handle($request, Closure $next)
    {
        $request->setTrustedProxies(['127.0.0.1', $request->server->get('REMOTE_ADDR')]);

        return $next($request);
    }