|
3 | 3 |
|
4 | 4 | type Query {
|
5 | 5 | products (
|
6 |
| - search: String @doc(description: "Performs a full-text search using the specified key words."), |
7 |
| - filter: ProductFilterInput @doc(description: "Identifies which product attributes to search for and return."), |
8 |
| - pageSize: Int = 20 @doc(description: "Specifies the maximum number of results to return at once. This attribute is optional."), |
9 |
| - currentPage: Int = 1 @doc(description: "Specifies which page of results to return. The default value is 1."), |
10 |
| - sort: ProductSortInput @doc(description: "Specifies which attribute to sort on, and whether to return the results in ascending or descending order.") |
11 |
| - ): Products |
12 |
| - @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Products") @doc(description: "The products query searches for products that match the criteria specified in the search and filter attributes") |
| 6 | + search: String @doc(description: "Performs a full-text search using the specified key words."), |
| 7 | + filter: ProductFilterInput @doc(description: "Identifies which product attributes to search for and return."), |
| 8 | + pageSize: Int = 20 @doc(description: "Specifies the maximum number of results to return at once. This attribute is optional."), |
| 9 | + currentPage: Int = 1 @doc(description: "Specifies which page of results to return. The default value is 1."), |
| 10 | + sort: ProductSortInput @doc(description: "Specifies which attribute to sort on, and whether to return the results in ascending or descending order.") |
| 11 | +): Products |
| 12 | + @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Products") @doc(description: "The products query searches for products that match the criteria specified in the search and filter attributes") |
13 | 13 | category (
|
14 |
| - id: Int @doc(description: "Id of the category") |
15 |
| - ): CategoryTree |
| 14 | + id: Int @doc(description: "Id of the category") |
| 15 | +): CategoryTree |
16 | 16 | @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\CategoryTree")
|
17 | 17 | }
|
18 | 18 |
|
@@ -248,8 +248,8 @@ interface ProductInterface @typeResolver(class: "Magento\\CatalogGraphQl\\Model\
|
248 | 248 | id: Int @doc(description: "The ID number assigned to the product") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\EntityIdToId")
|
249 | 249 | name: String @doc(description: "The product name. Customers use this name to identify the product.")
|
250 | 250 | sku: String @doc(description: "A number or code assigned to a product to identify the product, options, price, and manufacturer")
|
251 |
| - description: String @doc(description: "Detailed information about the product. The value can include simple HTML tags.") @resolver(class: "\\Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\ProductHtmlAttribute") |
252 |
| - short_description: String @doc(description: "A short description of the product. Its use depends on the theme.") @resolver(class: "\\Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\ProductHtmlAttribute") |
| 251 | + description: ProductTextareaAttribute @doc(description: "Detailed information about the product. The value can include simple HTML tags.") |
| 252 | + short_description: ProductTextareaAttribute @doc(description: "A short description of the product. Its use depends on the theme.") |
253 | 253 | special_price: Float @doc(description: "The discounted price of the product")
|
254 | 254 | special_from_date: String @doc(description: "The beginning date that a product has a special price")
|
255 | 255 | special_to_date: String @doc(description: "The end date that a product has a special price")
|
@@ -377,10 +377,10 @@ interface CategoryInterface @typeResolver(class: "Magento\\CatalogGraphQl\\Model
|
377 | 377 | product_count: Int @doc(description: "The number of products in the category")
|
378 | 378 | default_sort_by: String @doc(description: "The attribute to use for sorting")
|
379 | 379 | products(
|
380 |
| - pageSize: Int = 20 @doc(description: "Specifies the maximum number of results to return at once. This attribute is optional."), |
381 |
| - currentPage: Int = 1 @doc(description: "Specifies which page of results to return. The default value is 1."), |
382 |
| - sort: ProductSortInput @doc(description: "Specifies which attribute to sort on, and whether to return the results in ascending or descending order.") |
383 |
| - ): CategoryProducts @doc(description: "The list of products assigned to the category") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Category\\Products") |
| 380 | + pageSize: Int = 20 @doc(description: "Specifies the maximum number of results to return at once. This attribute is optional."), |
| 381 | + currentPage: Int = 1 @doc(description: "Specifies which page of results to return. The default value is 1."), |
| 382 | + sort: ProductSortInput @doc(description: "Specifies which attribute to sort on, and whether to return the results in ascending or descending order.") |
| 383 | +): CategoryProducts @doc(description: "The list of products assigned to the category") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Category\\Products") |
384 | 384 | breadcrumbs: [Breadcrumb] @doc(description: "Breadcrumbs, parent categories info") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Category\\Breadcrumbs")
|
385 | 385 | }
|
386 | 386 |
|
@@ -408,8 +408,8 @@ type VirtualProduct implements ProductInterface, CustomizableProductInterface @d
|
408 | 408 | }
|
409 | 409 |
|
410 | 410 | type SimpleProduct implements ProductInterface, PhysicalProductInterface, CustomizableProductInterface @doc(description: "A simple product is tangible and are usually sold as single units or in fixed quantities")
|
411 |
| -{ |
412 |
| -} |
| 411 | + { |
| 412 | + } |
413 | 413 |
|
414 | 414 | type Products @doc(description: "The Products object is the top-level object returned in a product search") {
|
415 | 415 | items: [ProductInterface] @doc(description: "An array of products that match the specified search criteria")
|
@@ -551,3 +551,10 @@ type SortFields @doc(description: "SortFields contains a default value for sort
|
551 | 551 | default: String @doc(description: "Default value of sort fields")
|
552 | 552 | options: [SortField] @doc(description: "Available sort fields")
|
553 | 553 | }
|
| 554 | + |
| 555 | +type ProductTextareaAttribute { |
| 556 | + content ( |
| 557 | + format: String! @doc(description: "The format of content") |
| 558 | +): String |
| 559 | + @resolver(class: "\\Magento\\CatalogGraphQl\\Model\\Resolver\\Product\\ProductTextareaAttribute") |
| 560 | +} |
0 commit comments