Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLTypes\Pagination

CouponConnection::getpublic staticWC 1.0

Method of the class: CouponConnection{}

No Hooks.

Returns

null. Nothing (null).

Usage

$result = CouponConnection::get(): ObjectType;

CouponConnection::get() code WC 10.9.1

public static function get(): ObjectType {
	if ( null === self::$instance ) {
		self::$instance = new ObjectType(
			array(
				'name'        => 'CouponConnection',
				'description' => __( 'A connection to a list of Coupon items.', 'woocommerce' ),
				'fields'      => fn() => array(
					'edges'       => array(
						'type' => Type::nonNull(
							Type::listOf(
								Type::nonNull(
									CouponEdge::get()
								)
							)
						),
					),
					'nodes'       => array(
						'type' => Type::nonNull(
							Type::listOf(
								Type::nonNull(
									CouponType::get()
								)
							)
						),
					),
					'page_info'   => array(
						'type' => Type::nonNull( PageInfo::get() ),
					),
					'total_count' => array(
						'type' => Type::nonNull( Type::int() ),
					),
				),
			)
		);
	}
	return self::$instance;
}