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
Description.php
28 lines
| 1 | <?php |
| 2 | |
| 3 | declare(strict_types=1); |
| 4 | |
| 5 | namespace Automattic\WooCommerce\Api\Attributes; |
| 6 | |
| 7 | use Attribute; |
| 8 | |
| 9 | /** |
| 10 | * Provides a human-readable description for the annotated element. |
| 11 | * |
| 12 | * Can be applied to classes (types, queries, mutations, enums), properties, or |
| 13 | * parameters. The text is exposed as the "description" field in the generated |
| 14 | * GraphQL schema and is visible in tools like GraphiQL. |
| 15 | */ |
| 16 | #[Attribute] |
| 17 | final class Description { |
| 18 | /** |
| 19 | * Constructor. |
| 20 | * |
| 21 | * @param string $description The text to expose as the GraphQL description. |
| 22 | */ |
| 23 | public function __construct( |
| 24 | public readonly string $description, |
| 25 | ) { |
| 26 | } |
| 27 | } |
| 28 |