Download the PHP package worksome/pest-graphql-coverage without Composer
On this page you can find all versions of the php package worksome/pest-graphql-coverage. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download worksome/pest-graphql-coverage
More information about worksome/pest-graphql-coverage
Files in worksome/pest-graphql-coverage
Package pest-graphql-coverage
Short Description A plugin for Pest to add GraphQL coverage via Lighthouse
License MIT
Homepage https://github.com/worksome/pest-graphql-coverage
Informations about the package pest-graphql-coverage
PestPHP GraphQL Coverage
This plugin adds supports for showing the coverage of the GraphQL schema (Lighthouse only).
Installation
You can install the package via composer:
Usage
To enable it simply add --gql-coverage
argument to your test command
It can even be used together with parallel
Setting coverage limits
By adding the argument --gql-min=<percentage>
, we can limit to have a min coverage of x.
Setting the number of output fields
By adding the argument --gql-untested-count=<max>
, we can increase or reduce the number of untested fields
that are output.
Changing default schema fetching command
By default, it will fetch the schema using php artisan lighthouse:print-schema
, however if you have a
custom command for fetching the schema, that can be used instead by adding --schema-command
argument
Excluding nodes from total coverage
By default, all nodes will be included when calculating coverage. However, if you have nodes such as the built-in
Lighthouse pagination types that you do not want to be covered, you can configure ignored fields from your Pest.php
configuration file.
Native Pest usage
This also works natively with Pest (without using Artisan), as it is a Pest plugin.
License
The MIT License (MIT). Please see License File for more information.
All versions of pest-graphql-coverage with dependencies
illuminate/contracts Version ^10.0 || ^11.0
nuwave/lighthouse Version ^6.36
pestphp/pest Version ^2.35 || ^3.0
pestphp/pest-plugin-laravel Version ^2.3 || ^3.0