|
| 1 | +<?php |
| 2 | +/** |
| 3 | + * WPInputObjectType - CollectionStatsWhereArgs |
| 4 | + * |
| 5 | + * @package WPGraphQL\WooCommerce\Type\WPInputObject |
| 6 | + * @since TBD |
| 7 | + */ |
| 8 | + |
| 9 | +namespace WPGraphQL\WooCommerce\Type\WPInputObject; |
| 10 | + |
| 11 | +/** |
| 12 | + * Class Collection_Stats_Where_Args |
| 13 | + */ |
| 14 | +class Collection_Stats_Where_Args { |
| 15 | + /** |
| 16 | + * Registers type |
| 17 | + * |
| 18 | + * @return void |
| 19 | + */ |
| 20 | + public static function register() { |
| 21 | + register_graphql_input_type( |
| 22 | + 'CollectionStatsWhereArgs', |
| 23 | + [ |
| 24 | + 'description' => __( 'Arguments used to filter the collection results', 'wp-graphql-woocommerce' ), |
| 25 | + 'fields' => [ |
| 26 | + 'search' => [ |
| 27 | + 'type' => 'String', |
| 28 | + 'description' => __( 'Limit result set to products based on a keyword search.', 'wp-graphql-woocommerce' ), |
| 29 | + ], |
| 30 | + 'slugIn' => [ |
| 31 | + 'type' => [ 'list_of' => 'String' ], |
| 32 | + 'description' => __( 'Limit result set to products with specific slugs.', 'wp-graphql-woocommerce' ), |
| 33 | + ], |
| 34 | + 'typeIn' => [ |
| 35 | + 'type' => [ 'list_of' => 'ProductTypesEnum' ], |
| 36 | + 'description' => __( 'Limit result set to products assigned to a group of specific types.', 'wp-graphql-woocommerce' ), |
| 37 | + ], |
| 38 | + 'exclude' => [ |
| 39 | + 'type' => [ 'list_of' => 'Int' ], |
| 40 | + 'description' => __( 'Ensure result set excludes specific IDs.', 'wp-graphql-woocommerce' ), |
| 41 | + ], |
| 42 | + 'include' => [ |
| 43 | + 'type' => [ 'list_of' => 'Int' ], |
| 44 | + 'description' => __( 'Limit result set to specific ids.', 'wp-graphql-woocommerce' ), |
| 45 | + ], |
| 46 | + 'sku' => [ |
| 47 | + 'type' => 'String', |
| 48 | + 'description' => __( 'Limit result set to products with specific SKU(s). Use commas to separate.', 'wp-graphql-woocommerce' ), |
| 49 | + ], |
| 50 | + 'featured' => [ |
| 51 | + 'type' => 'Boolean', |
| 52 | + 'description' => __( 'Limit result set to featured products.', 'wp-graphql-woocommerce' ), |
| 53 | + ], |
| 54 | + 'parentIn' => [ |
| 55 | + 'type' => [ 'list_of' => 'Int' ], |
| 56 | + 'description' => __( 'Specify objects whose parent is in an array.', 'wp-graphql-woocommerce' ), |
| 57 | + ], |
| 58 | + 'parentNotIn' => [ |
| 59 | + 'type' => [ 'list_of' => 'Int' ], |
| 60 | + 'description' => __( 'Specify objects whose parent is not in an array.', 'wp-graphql-woocommerce' ), |
| 61 | + ], |
| 62 | + 'categoryIn' => [ |
| 63 | + 'type' => [ 'list_of' => 'String' ], |
| 64 | + 'description' => __( 'Limit result set to products assigned to a group of specific categories by name.', 'wp-graphql-woocommerce' ), |
| 65 | + ], |
| 66 | + 'categoryIdIn' => [ |
| 67 | + 'type' => [ 'list_of' => 'Int' ], |
| 68 | + 'description' => __( 'Limit result set to products assigned to a specific group of category IDs.', 'wp-graphql-woocommerce' ), |
| 69 | + ], |
| 70 | + 'tagIn' => [ |
| 71 | + 'type' => [ 'list_of' => 'String' ], |
| 72 | + 'description' => __( 'Limit result set to products assigned to a specific group of tags by name.', 'wp-graphql-woocommerce' ), |
| 73 | + ], |
| 74 | + 'tagIdIn' => [ |
| 75 | + 'type' => [ 'list_of' => 'Int' ], |
| 76 | + 'description' => __( 'Limit result set to products assigned to a specific group of tag IDs.', 'wp-graphql-woocommerce' ), |
| 77 | + ], |
| 78 | + 'attributes' => [ |
| 79 | + 'type' => [ 'list_of' => 'ProductAttributeFilterInput' ], |
| 80 | + 'description' => __( 'Limit result set to products with a specific attribute. Use the taxonomy name/attribute slug.', 'wp-graphql-woocommerce' ), |
| 81 | + ], |
| 82 | + 'stockStatus' => [ |
| 83 | + 'type' => [ 'list_of' => 'StockStatusEnum' ], |
| 84 | + 'description' => __( 'Limit result set to products in stock or out of stock.', 'wp-graphql-woocommerce' ), |
| 85 | + ], |
| 86 | + 'onSale' => [ |
| 87 | + 'type' => 'Boolean', |
| 88 | + 'description' => __( 'Limit result set to products on sale.', 'wp-graphql-woocommerce' ), |
| 89 | + ], |
| 90 | + 'minPrice' => [ |
| 91 | + 'type' => 'Float', |
| 92 | + 'description' => __( 'Limit result set to products based on a minimum price.', 'wp-graphql-woocommerce' ), |
| 93 | + ], |
| 94 | + 'maxPrice' => [ |
| 95 | + 'type' => 'Float', |
| 96 | + 'description' => __( 'Limit result set to products based on a maximum price.', 'wp-graphql-woocommerce' ), |
| 97 | + ], |
| 98 | + 'visibility' => [ |
| 99 | + 'type' => 'CatalogVisibilityEnum', |
| 100 | + 'description' => __( 'Limit result set to products with a specific visibility level.', 'wp-graphql-woocommerce' ), |
| 101 | + ], |
| 102 | + 'rating' => [ |
| 103 | + 'type' => [ 'list_of' => 'Integer' ], |
| 104 | + 'description' => __( 'Limit result set to products with a specific average rating. Must be between 1 and 5', 'wp-graphql-woocommerce' ), |
| 105 | + ], |
| 106 | + ], |
| 107 | + ] |
| 108 | + ); |
| 109 | + } |
| 110 | +} |
0 commit comments