Resolve the field directive.

@param  \Nuwave\Lighthouse\Schema\Values\FieldValue  $value
@param  \Closure  $next
@return \Nuwave\Lighthouse\Schema\Values\FieldValue
763656
public function handleField(FieldValue $value, Closure $next): FieldValue
    {
        $value = $next($value);

        $resolver = $value->getResolver();

        return $value->setResolver(function ($root, array $args, GraphQLContext $context, ResolveInfo $resolveInfo) use ($resolver) {
            $start = $this->tracing->getTime();

            $result = $resolver($root, $args, $context, $resolveInfo);

            $end = $this->tracing->getTime();

            if ($result instanceof Deferred) {
                $result->then(function () use ($resolveInfo, $start, $end): void {
                    $this->tracing->record($resolveInfo, $start, $end);
                });
            } else {
                $this->tracing->record($resolveInfo, $start, $end);
            }

            return $result;
        });
    }
1237697
public function resolveField(FieldValue $fieldValue): FieldValue
    {
        return $fieldValue->setResolver(
            function ($root, array $args) {
                $argumentDefinition = $this->getSingleArgumentDefinition();

                if ($argumentDefinition->type->kind !== NodeKind::NON_NULL_TYPE) {
                    throw new DirectiveException(
                        "The @delete directive requires the field {$this->definitionNode->name->value} to have a NonNull argument. Mark it with !"
                    );
                }

                $idOrIds = reset($args);
                if ($this->directiveArgValue('globalId', false)) {
                    // At this point we know the type is at least wrapped in a NonNull type, so we go one deeper
                    if ($argumentDefinition->type->type->kind === NodeKind::LIST_TYPE) {
                        $idOrIds = array_map(
                            function ($id) {
                                return $this->globalId->decodeID($id);
                            },
                            $idOrIds
                        );
                    } else {
                        $idOrIds = $this->globalId->decodeID($idOrIds);
                    }
                }

                $modelClass = $this->getModelClass();
                $model = $modelClass::find($idOrIds);

                if (! $model) {
                    return;
                }

                if ($model instanceof Model) {
                    $model->delete();
                }

                if ($model instanceof Collection) {
                    $modelClass::destroy($idOrIds);
                }

                return $model;
            }
        );
    }
637419
public function handle($request, Closure $next)
    {
        $route  = $this->container->make(Route::class);
        $binder = $this->container->make(RouteBinderRegister::class);

        $binder->substituteBindings($route);

        return $next($request);
    }
1306936
public function handle($request, Closure $next)
    {
        if ($this->auth->parser()->setRequest($request)->hasToken()) {
            try {
                $this->auth->parseToken()->authenticate();
            } catch (Exception $e) {
                //
            }
        }

        return $next($request);
    }
873539
public function handle(Request $request, \Closure $next)
	{
		$this->buildRepository($request);

		return $next($request);
	}
1138999
public function handle($request, Closure $next)
    {
        if (! $this->isCorsRequest($request)) {
            return $next($request);
        }

        $this->corsProfile->setRequest($request);

        if (! $this->corsProfile->isAllowed()) {
            return $this->forbiddenResponse();
        }

        if ($this->isPreflightRequest($request)) {
            return $this->handlePreflightRequest();
        }

        $response = $next($request);

        return $this->corsProfile->addCorsHeaders($response);
    }
958767
public function handle($request, Closure $next)
    {
        $prefix = admin_prefix();

        if ($request->is("$prefix/*") || $request->is($prefix)) {
            config()->set('auth.defaults.guard', 'administrator');
        }

        return $next($request);
    }
290941
public function handle($request, Closure $next)
    {
        if ($theme = $request->query('cms-theme')) {
            $finder   = app('themes.view.finder');
            $basePath = config('themes.path.frontend', base_path('themes/frontend'));
            $finder->removeBasePath();
            $finder->setBasePath($basePath . DIRECTORY_SEPARATOR . $theme);

            config(['themes.frontend' => $theme]);
        }

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

        $headers = (new SecureHeaders(config('secure-headers', [])))->headers();

        foreach ($headers as $key => $value) {
            $response->headers->set($key, $value, true);
        }

        return $response;
    }
491073
public function handle($request, Closure $next)
    {
        $request->setTrustedProxies(['127.0.0.1', $request->server->get('REMOTE_ADDR')]);

        return $next($request);
    }
1005105
public function handle($request, Closure $next)
    {
        if (config('https.force') && ! $request->isSecure()) {
            return Redirect::secure($request->path());
        }

        return $next($request);
    }
987842
public function handle(Request $request, Closure $next)
    {
        $request::setTrustedProxies([], $this->getTrustedHeaderNames()); // Reset trusted proxies between requests
        $this->setTrustedProxyIpAddresses($request);

        return $next($request);
    }
776169
public function handle($request, Closure $next)
    {
        $route = $request->route();

        $this->router->substituteBindings($route);

        $this->substituteImplicitBindings($route);

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

        if ($response instanceof Response) {
            $this->setProfiles($this->getProfileConfig());

            $this->setProfilesWithParameters(func_get_args());

            $psr7Response = $this->createPsr7Response($response);

            $psr7Response = $this->addPolicyHeader($psr7Response);

            $response = $this->createLaravelResponse($psr7Response);
        }

        return $response;
    }
1223744
public function handleField(FieldValue $value, Closure $next): FieldValue
    {
        $relations = $this->directiveArgValue('relations', []);
        $resolver = $value->getResolver();

        return $next($value->setResolver(function () use ($resolver, $relations) {
            $result = call_user_func_array($resolver, func_get_args());
            ($result instanceof Deferred)
                ? $result->then(function (Collection &$items) use ($relations) {
                    $items->load($relations);

                    return $items;
                })
                : $result->load($relations);

            return $result;
        }));
    }
729059
public function handle($request, Closure $next)
    {
        $acceptLanguage = $request->header('Accept-Language');
        $locale = $this->getLocale($acceptLanguage);
        \App::setLocale($locale);
        return $next($request);
    }
953052
public function handle($request, Closure $next)
    {
        $locale = \LocaleHelper::getLocale();
        app()->setLocale($locale);

        return $next($request);
    }