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

ProductVariationConnection{}WC 1.0

No Hooks.

Usage

$ProductVariationConnection = new ProductVariationConnection();
// use class methods

Methods

  1. public static get()

ProductVariationConnection{} code WC 10.9.1

class ProductVariationConnection {
	private static ?ObjectType $instance = null;

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