<?php
declare(strict_types=1);

// THIS FILE IS AUTO-GENERATED. DO NOT EDIT MANUALLY.

namespace Automattic\WooCommerce\Internal\Api\Autogenerated;

use Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLQueries\ListProducts;
use Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLQueries\GetProduct;
use Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLQueries\GetCoupon;
use Automattic\WooCommerce\Internal\Api\Autogenerated\GraphQLQueries\ListCoupons;
use Automattic\WooCommerce\Api\Infrastructure\MetadataController;
use Automattic\WooCommerce\Api\Infrastructure\Schema\ObjectType;

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

	public static function get(): ObjectType {
		if ( null === self::$instance ) {
			self::$instance = new ObjectType(
				array(
					'name'   => 'Query',
					'fields' => fn() => array(
						'products'                     => ListProducts::get_field_definition(),
						'product'                      => GetProduct::get_field_definition(),
						'coupon'                       => GetCoupon::get_field_definition(),
						'coupons'                      => ListCoupons::get_field_definition(),
						MetadataController::FIELD_NAME => MetadataController::get_field_definition(),
					),
				)
			);
		}
		return self::$instance;
	}
}
