bbs-lab / lighthouse-persisted-queries
Laravel Lighthouse middleware to handle GraphQL persisted queries
Installs: 4 421
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.4|^8.0
- illuminate/contracts: ^7.0|^8.0|^9.0
- nuwave/lighthouse: ^4.0|^5.0
- spatie/laravel-package-tools: ^1.4.3
Requires (Dev)
- brianium/paratest: ^6.2
- nunomaduro/collision: ^5.3|^6.0
- orchestra/testbench: ^v5.18|^6.6|^7.0
- phpunit/phpunit: ^9.3
- spatie/laravel-ray: ^1.9
- vimeo/psalm: ^4.4
This package is auto-updated.
Last update: 2024-11-21 17:03:01 UTC
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require bbls-lab/lighthouse-persisted-queries
You can publish the config file with:
php artisan vendor:publish --provider="BBSLab\LighthousePersistedQueries\LighthousePersistedQueriesServiceProvider" --tag="lighthouse-persisted-queries-config"
This is the contents of the published config file:
return [ 'cache' => [ 'prefix' => env('LPQ_CACHE_PREFIX', 'persisted_query'), 'ttl' => env('LPQ_CACHE_TTL', 0), 'max-age' => env('LPQ_CACHE_MAX_AGE', 86400), ], 'excluded_operations' => [ // ], ];
Usage
To handle persisted queries you add the BBSLab\LighthousePersistedQueries\PersistsQuery
middleware to the lighthouse middleware configuration section.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
License
The MIT License (MIT). Please see License File for more information.