src/Defer/Defer.php
public function resolve(Closure $originalResolver, string $path)
    {
        $isDeferred = $this->isDeferred($path);
        $resolver = $isDeferred
            ? $this->deferred[$path]
            : $originalResolver;

        if ($isDeferred) {
            $this->resolved[] = $path;

            unset($this->deferred[$path]);
        }

        return $resolver();
    }
public function resolve(Closure $originalResolver, string $path)
    {
        $isDeferred = $this->isDeferred($path);
        $resolver = $isDeferred
            ? $this->deferred[$path]
            : $originalResolver;

        if ($isDeferred) {
            $this->resolved[] = $path;

            unset($this->deferred[$path]);
        }

        return $resolver();
    }
public function resolve ( Closure $ originalResolver , string $ path ) { $ isDeferred = $ this -> isDeferred ( $ path ) ; $ resolver = $ isDeferred ? $ this -> deferred [ $ path ] : $ originalResolver ; if ( $ isDeferred ) { $ this -> resolved [ ] = $ path ; unset ( $ this -> deferred [ $ path ] ) ; } return $ resolver ( ) ; }
Resolve field with data or resolver.

@param  \Closure  $originalResolver
@param  string  $path
@return mixed
Resolve field with data or resolver .