Automattic\WooCommerce\Vendor\GraphQL\Type\Definition
Directive::deprecatedDirective
Method of the class: Directive{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = Directive::deprecatedDirective(): Directive;
Directive::deprecatedDirective() Directive::deprecatedDirective code WC 10.9.1
public static function deprecatedDirective(): Directive
{
return self::$internalDirectives[self::DEPRECATED_NAME] ??= new self([
'name' => self::DEPRECATED_NAME,
'description' => 'Marks an element of a Automattic\WooCommerce\Vendor\GraphQL schema as no longer supported.',
'locations' => [
DirectiveLocation::FIELD_DEFINITION,
DirectiveLocation::ENUM_VALUE,
DirectiveLocation::ARGUMENT_DEFINITION,
DirectiveLocation::INPUT_FIELD_DEFINITION,
],
'args' => [
self::REASON_ARGUMENT_NAME => [
'type' => Type::string(),
'description' => 'Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).',
'defaultValue' => self::DEFAULT_DEPRECATION_REASON,
],
],
]);
}