Skip to content

Track GraphQL queries usage and execution time with Laravel Pulse

License

Notifications You must be signed in to change notification settings

quix-labs/laravel-pulse-graphql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL tracking for Laravel Pulse

GraphQL requests in Laravel Pulse

Latest Version on Packagist Total Downloads


This package allow your to track all your GraphQL queries and mutations with rebing/graphql-laravel


Installation

You can install the package via composer:

composer require quix-labs/laravel-pulse-graphql

Register the recorder

Add the GraphqlRecorder inside config/pulse.php.

(If you don't have this file make sure you have published the config file of Larave Pulse using php artisan vendor:publish --tag=pulse-config)

return [
    // ...

    'recorders' => [
        // Existing recorders...
        
        \QuixLabs\LaravelPulseGraphql\Recorders\GraphqlRecorder::class => [], 
    ]
]

Add to your dashboard

To add the card to the Pulse dashboard, you must first publish the vendor view.

php artisan vendor:publish --tag=pulse-dashboard

Then, you can modify the dashboard.blade.php file and add the requests-graph livewire template:

<livewire:pulse.graphql cols="6" />

License

The MIT License (MIT). Please see License File for more information.