PHPackages                             uroshcs/graphql-laravel-query-debug - 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. [Framework](/categories/framework)
4. /
5. uroshcs/graphql-laravel-query-debug

ActiveLibrary[Framework](/categories/framework)

uroshcs/graphql-laravel-query-debug
===================================

Query debugger for laraver rebing/graphql-laravel package

v1.0(7y ago)3831[1 PRs](https://github.com/UrosHCS/graphql-laravel-query-debug/pulls)MITPHP

Since May 29Pushed 6y agoCompare

[ Source](https://github.com/UrosHCS/graphql-laravel-query-debug)[ Packagist](https://packagist.org/packages/uroshcs/graphql-laravel-query-debug)[ RSS](/packages/uroshcs-graphql-laravel-query-debug/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel GraphQL
===============

[](#laravel-graphql)

A simple package that creates a graphql query type that enables fetching the list of executed database queries. This can be used to check which database queries were executed and how many of them.

This package requires an installed and published (`php artisan vendor:publish ...`) [Rebing's graphql-laravel](https://github.com/rebing/graphql-laravel) package. If you don't have this package installed and published, do that first. That way you will have `app/config/graphql.php` file, which needs to be edited.

Installation
------------

[](#installation)

#### Dependencies:

[](#dependencies)

- [Rebing's graphql-laravel](https://github.com/rebing/graphql-laravel)

#### Installation:

[](#installation-1)

**1-** Require the package via Composer in your `composer.json`.

```
{
  "require": {
    "uroshcs/graphql-laravel-query-debug": "dev-master"
  }
}
```

**2-** Run Composer to install or update the new requirement.

```
$ composer install
```

or

```
$ composer update
```

**3-** Add the service provider to your `app/config/app.php` file

```
Uroshcs\GraphQLQueryDebugger\DebuggerServiceProvider::class,
```

**4-** Add `queries_executed` query to your `app/config/graphql.php` file

```
'schemas' => [
    'default' => [
        'query' => [
            // other query types
            'queries_executed' => Uroshcs\GraphQLQueryDebugger\GraphQL\QueriesExecutedQuery::class,
        ],
        // mutations, middleware
    ],
],
```

**5-** Add `query_executed` type to your `app/config/graphql.php` file

```
'types' => [
    // other types
    'query_executed' => Uroshcs\GraphQLQueryDebugger\GraphQL\QueryExecutedType::class,
],
```

Usage
-----

[](#usage)

The full query with all possible fields looks like this:

```
{
    # other fields

    queries_executed {
        sql
        bindings
        time
        connection_name
    }
}
```

In order for this package to do it's job correctly, the `queries_executed` needs to be the last query in order to accumulate the database queries from other types.

For example, a query like this:

```
{
    users (limit: 10, page: 1) {
        total
        data {
            id
            username
            email
            posts_count
        }
    }

    queries_executed {
        sql
        bindings
        time
        connection_name
    }
}
```

should give a response like this:

```
{
  "data": {
    "users": {
      "total": 58,
      "data": [
        {
          "id": 1,
          "username": "john.smith",
          "email": "john.smith@example.com",
          "posts_count": 12
        },
        // ...
      ]
    },
    "queries_executed": [
      {
        "sql": "select count(*) as aggregate from `users`",
        "bindings": "[]",
        "time": 91.07,
        "connection_name": "mysql"
      },
      {
        "sql": "select `users`.`id`, `users`.`username`, `users`.`email`, (select count(*) from `posts` where `users`.`id` = `posts`.`user_id`) as `posts_count` from `users` limit 10 offset 0",
        "bindings": "[]",
        "time": 39.58,
        "connection_name": "mysql"
      }
    ]
  }
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity63

Established project with proven stability

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2910d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/11469291728e1288322db1677decbc78a26337eb8380e0a4f4675b4d83d837fe?d=identicon)[UrosHCS](/maintainers/UrosHCS)

---

Tags

frameworklaravelgraphqlquerydebugger

### Embed Badge

![Health badge](/badges/uroshcs-graphql-laravel-query-debug/health.svg)

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

###  Alternatives

[rebing/graphql-laravel

Laravel wrapper for PHP GraphQL

2.2k7.1M26](/packages/rebing-graphql-laravel)[lanin/laravel-api-debugger

Easily debug your JSON API.

2311.8M](/packages/lanin-laravel-api-debugger)[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)[avored/framework

This is my package framework

7816.5k6](/packages/avored-framework)[saad/api-debugger

Easily debug your JSON API.

1170.1k](/packages/saad-api-debugger)

PHPackages © 2026

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