PHP code example of worksome / pest-graphql-coverage

1. Go to this page and download the library: Download worksome/pest-graphql-coverage library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

worksome / pest-graphql-coverage example snippets




declare(strict_types=1);

use Worksome\PestGraphqlCoverage\Config as GraphQLCoverageConfig;

GraphQLCoverageConfig::new()
    ->ignore([
        'PaginatorInfo.count',
        // ...
    ]);

// Exclude all paginator info nodes
GraphQLCoverageConfig::new()
    ->ignorePaginatorInfo();
bash
php artisan test --gql-coverage
bash
php artisan test --gql-coverage --gql-min=60
shell
php artisan test --gql-coverage --gql-untested-count=25
bash
php artisan test --gql-coverage --schema-command="php artisan lighthouse:print-schema-v2"