ArrayOf.php
2 months ago
ConnectionOf.php
2 months ago
Deprecated.php
2 months ago
Description.php
2 months ago
Experimental.php
4 weeks ago
HiddenFromMetadataQuery.php
4 weeks ago
Ignore.php
2 months ago
Internal.php
4 weeks ago
Metadata.php
4 weeks ago
Name.php
2 months ago
Parameter.php
2 months ago
ParameterDescription.php
2 months ago
PublicAccess.php
4 weeks ago
RequiredCapability.php
4 weeks ago
ReturnType.php
2 months ago
ScalarType.php
2 months ago
Unroll.php
2 months ago
Unroll.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Automattic\WooCommerce\Api\Attributes; |
| 6 | |
| 7 | use Attribute; |
| 8 | |
| 9 | /** |
| 10 | * Expands a class's properties into individual flat GraphQL arguments. |
| 11 | * |
| 12 | * When applied to a class, any `execute()` parameter of that type is |
| 13 | * automatically unrolled. When applied to a specific `execute()` parameter, |
| 14 | * only that usage is unrolled. |
| 15 | * |
| 16 | * Each public property of the target class becomes a separate GraphQL argument. |
| 17 | * Properties marked with #[Ignore] are skipped, and #[Description] on |
| 18 | * properties is forwarded to the generated argument descriptions. |
| 19 | * |
| 20 | * The generated resolver constructs the original class via its constructor, |
| 21 | * passing the individual argument values as named parameters. |
| 22 | */ |
| 23 | #[Attribute( Attribute::TARGET_CLASS | Attribute::TARGET_PARAMETER )] |
| 24 | final class Unroll { |
| 25 | } |
| 26 |