src/Execution/QueryFilter.php
public static function apply($query, array $args, array $scopes, ResolveInfo $resolveInfo)
    {
        /** @var \Nuwave\Lighthouse\Execution\QueryFilter $queryFilter */
        if ($queryFilter = $resolveInfo->queryFilter ?? false) {
            $query = $queryFilter->filter($query, $args);
        }

        foreach ($scopes as $scope) {
            call_user_func([$query, $scope], $args);
        }

        return $query;
    }
public static function apply($query, array $args, array $scopes, ResolveInfo $resolveInfo)
    {
        /** @var \Nuwave\Lighthouse\Execution\QueryFilter $queryFilter */
        if ($queryFilter = $resolveInfo->queryFilter ?? false) {
            $query = $queryFilter->filter($query, $args);
        }

        foreach ($scopes as $scope) {
            call_user_func([$query, $scope], $args);
        }

        return $query;
    }
public static function apply ( $ query , array $ args , array $ scopes , ResolveInfo $ resolveInfo ) { /** @var \Nuwave\Lighthouse\Execution\QueryFilter $queryFilter */ if ( $ queryFilter = $ resolveInfo -> queryFilter ?? false ) { $ query = $ queryFilter -> filter ( $ query , $ args ) ; } foreach ( $ scopes as $ scope ) { call_user_func ( [ $ query , $ scope ] , $ args ) ; } return $ query ; }
Check if the ResolveInfo contains a QueryFilter instance and apply it to the query if given.

@param  \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder  $query
@param  array  $args
@param  string[]  $scopes
@param  \GraphQL\Type\Definition\ResolveInfo  $resolveInfo
@return \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder
Check if the ResolveInfo contains a QueryFilter instance and apply it to the query if given .