Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLQueries
ListCoupons::get_field_definition
Method of the class: ListCoupons{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = ListCoupons::get_field_definition(): array;
ListCoupons::get_field_definition() ListCoupons::get field definition code WC 10.9.1
public static function get_field_definition(): array {
return array(
'type' => Type::nonNull( CouponConnectionType::get() ),
'description' => __( 'List coupons with cursor-based pagination.', 'woocommerce' ),
'authorization' => array(
array(
'attribute' => 'RequiredCapability',
'args' => array(
0 => 'read_private_shop_coupons',
),
),
),
'args' => array(
'first' => array(
'type' => Type::int(),
'description' => __( 'Return the first N results. Must be between 0 and 100.', 'woocommerce' ),
'defaultValue' => null,
),
'last' => array(
'type' => Type::int(),
'description' => __( 'Return the last N results. Must be between 0 and 100.', 'woocommerce' ),
'defaultValue' => null,
),
'after' => array(
'type' => Type::string(),
'description' => __( 'Return results after this cursor.', 'woocommerce' ),
'defaultValue' => null,
),
'before' => array(
'type' => Type::string(),
'description' => __( 'Return results before this cursor.', 'woocommerce' ),
'defaultValue' => null,
),
'status' => array(
'type' => CouponStatusType::get(),
'description' => __( 'Filter by coupon status.', 'woocommerce' ),
'defaultValue' => null,
),
),
'complexity' => ResolverHelpers::complexity_from_pagination( ... ),
'resolve' => array( self::class, 'resolve' ),
);
}