PHPackages                             simexis/laravel-graphql-filter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. simexis/laravel-graphql-filter

ActiveLibrary[API Development](/categories/api)

simexis/laravel-graphql-filter
==============================

Define GraphQL schema for connection filtering using Laravel filterable models

020PHP

Since Apr 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/jooorooo/laravel-graphql-filter)[ Packagist](https://packagist.org/packages/simexis/laravel-graphql-filter)[ RSS](/packages/simexis-laravel-graphql-filter/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Simexis\\GraphQLFilter
======================

[](#simexisgraphqlfilter)

Define GraphQL schema for connection filtering using Laravel filterable models.

Installation
============

[](#installation)

```
composer require simexis/laravel-graphql-filter

```

Usage
=====

[](#usage)

Use Filterable trait on Model

```
namespace App;
use Simexis\Filterable\Filterable;

class User extends Model
{
  use \Simexis\Filterable\FilterableTrait;

  protected $filterable = [
    'name' => Filterable::String
  ];
}

```

Create GraphQL User type

```
namespace App\GraphQL\Type;

use App\User;
use GraphQL\Type\Definition\Type;
use Folklore\GraphQL\Support\Type as GraphQLType;

class User extends GraphQLType
{
  protected $attributes = [
    'name' => 'User'
  ];
  public function fields() {
    return [
      'id' => [
        'type' => Type::id(),
      ],
      'name' => [
        'type' => Type::string()
      ]
    ]
  }
}

```

Create GraphQL UserFilter type. The UserFilter fields defintion will be automatically populated with fields in `User::$filterable`.

```
namespace App\GraphQL\Type;

use App\User;
use Simexis\GraphQLFilter\Type\FilterType;

class UserFilter extends FilterType
{
  protected $model = User::class;
}

```

Create GraphQL query type to list User records using the User model's filterable settings.

```
namespace App\GraphQL\Type;

use App\User;
use GraphQL;
use GraphQL\Type\Definition\Type;
use Folklore\GraphQL\Support\Query;

class UsersQuery extends Query
{
  protected $attributes = [
    'name' => 'users'
  ];
  public function type() {
    return Type::listOf(GraphQL::type('User'));
  }
  public function args() {
    return [
      'filter' => [
        'type' => GraphQL::type('UserFilter')
      ]
    ];
  }
  public function resolve($root, $args, $context) {
    return User::filter($args['filter'])->orderBy('name')->limit(10)->get();
  }
}

```

A GraphQL query can now use the `Filterable::String` rules to perform searches.

```
query ListJohns {
  users (filter: { name_MATCH: 'john' }) {
    name
  }
}

```

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/b94e45e0fc8056daeec3bc285ca4befdbaf5064a57f29bd9d93a9459afab9a28?d=identicon)[jooorooo](/maintainers/jooorooo)

### Embed Badge

![Health badge](/badges/simexis-laravel-graphql-filter/health.svg)

```
[![Health](https://phpackages.com/badges/simexis-laravel-graphql-filter/health.svg)](https://phpackages.com/packages/simexis-laravel-graphql-filter)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k12](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
