Download the PHP package lastdragon-ru/lara-asp-graphql-printer without Composer
On this page you can find all versions of the php package lastdragon-ru/lara-asp-graphql-printer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lastdragon-ru/lara-asp-graphql-printer
More information about lastdragon-ru/lara-asp-graphql-printer
Files in lastdragon-ru/lara-asp-graphql-printer
Package lara-asp-graphql-printer
Short Description The Awesome Set of Packages for Laravel - The GraphQL Printer.
License MIT
Homepage https://github.com/LastDragon-ru/lara-asp
Informations about the package lara-asp-graphql-printer
GraphQL Printer
Independent (from Laravel and Lighthouse) package that allow you to print GraphQL Schema and Queries in highly customized way eg you can choose indent size, print only used/wanted/all types, print only one type, print used/wanted/all directives (it is not possible with standard printer) and even check which types/directives are used in the Schema/Query.
[include:artisan]: <lara-asp-documentator:requirements "{$directory}">
Requirements
Requirement | Constraint | Supported by |
---|---|---|
PHP | ^8.4 |
HEAD ⋯ 8.0.0 |
^8.3 |
HEAD ⋯ 5.0.0 |
|
^8.2 |
7.2.0 ⋯ 3.0.0 |
|
^8.1 |
6.4.2 ⋯ 3.0.0 |
|
^8.0 |
4.6.0 ⋯ 3.0.0 |
|
webonyx/graphql-php |
^15.4.0 |
HEAD ⋯ 4.2.1 |
^15.2.4 |
4.2.0 ⋯ 4.0.0 |
|
^14.11.9 |
3.0.0 |
Installation
Usage
There are two primary methods: Printer::print()
and Printer::export()
. The print()
will print the current type only, meanwhile export()
will print the current type and all used types/directives:
The $printer->print($type)
is:
The $printer->export($type)
is:
Customization
Please see:
Settings
directory to see built-in settings;Settings
interface to see all supported settings;DirectiveResolver
interface to define your own way to find all available directives and their definitions;
Filtering
[!NOTE]
By default, built-in/internal type/directives are not printed, if you want/need them, you should allow them by type/directive definitions filters.
The Printer allows filter out types and directives. This may be useful to exclude them from the schema completely. Filtering also works for queries. Please note that types filtering will work only if the schema is known (the schema is required to determine the type of argument nodes). For some AST node types, their type may also be required.
The $printer->print($schema)
is:
The $printer->print($query)
is:
Laravel/Lighthouse
It is highly recommended to use lara-asp-graphql
package to use the Printer
within the Laravel/Lighthouse application.
Testing Assertions
assertGraphQLExportableEquals
Exports and compares two GraphQL schemas/types/nodes/etc.
Read more.
assertGraphQLPrintableEquals
Prints and compares two GraphQL schemas/types/nodes/etc.
Read more.
Upgrading
Please follow Upgrade Guide.
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.
All versions of lara-asp-graphql-printer with dependencies
ext-mbstring Version *
symfony/polyfill-php84 Version ^1.31
webonyx/graphql-php Version ^15.4.0