lastdragon-ru / lara-asp-graphql-testing
The Awesome Set of Packages for Laravel - The GraphQL Testing Assertions for Laravel/Lighthouse
Requires
- php: ^8.3|^8.4
- ext-mbstring: *
- illuminate/contracts: ^12.0.1
- illuminate/filesystem: ^12.0.1
- lastdragon-ru/graphql-printer: dev-main
- lastdragon-ru/graphql-printer-testing: dev-main
- lastdragon-ru/lara-asp-testing: dev-main
- nuwave/lighthouse: ^6.54.0
- phpunit/phpunit: ^11.2.0|^12.0.0
- webonyx/graphql-php: ^15.4.0
Requires (Dev)
- illuminate/database: ^12.0.1
- illuminate/support: ^12.0.1
- lastdragon-ru/lara-asp-core: dev-main
- lastdragon-ru/lara-asp-graphql: dev-main
- orchestra/testbench: ^10.0.0
This package is auto-updated.
Last update: 2025-08-08 10:33:45 UTC
README
Useful assertions for PHPUnit to check printed/exported type/queries and more with lastdragon-ru/lara-asp-graphql
package
Requirements
Requirement | Constraint | Supported by |
---|---|---|
PHP | ^8.4 |
HEAD |
^8.3 |
HEAD |
|
PHPUnit | ^12.0.0 |
HEAD |
^11.2.0 |
HEAD |
Installation
composer require lastdragon-ru/lara-asp-graphql-testing
Usage
<?php declare(strict_types = 1); namespace LastDragon_ru\LaraASP\GraphQL\Testing\Docs\Examples; use LastDragon_ru\LaraASP\GraphQL\Testing\GraphQLAssertions; use PHPUnit\Framework\TestCase; /** * @internal */ abstract class Usage extends TestCase { use GraphQLAssertions; }
Assertions
assertGraphQLIntrospectionEquals
Compares default public schema (as the client sees it through introspection).
assertGraphQLSchemaEquals
Compares default internal schema (with all directives).
assertGraphQLSchemaNoBreakingChanges
Checks that no breaking changes in the default internal schema (with all directives).
assertGraphQLSchemaNoDangerousChanges
Checks that no dangerous changes in the default internal schema (with all directives).
assertGraphQLSchemaValid
Validates default internal schema (with all directives). Faster than lighthouse:validate-schema
command because loads only used directives.
Contributing
This package is the part of Awesome Set of Packages for Laravel. Please use the main repository to report issues, send pull requests, or ask questions.