Skip to content

Commit cde04fc

Browse files
author
vitaliyboyko
committed
GraphQl-45: pretified schema
Signed-off-by: vitaliyboyko <[email protected]>
1 parent 8aedb95 commit cde04fc

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

app/code/Magento/CatalogGraphQl/etc/schema.graphqls

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33

44
type Query {
55
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")
1313
category (
14-
id: Int @doc(description: "Id of the category")
15-
): CategoryTree
14+
id: Int @doc(description: "Id of the category")
15+
): CategoryTree
1616
@resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\CategoryTree")
1717
}
1818

@@ -377,10 +377,10 @@ interface CategoryInterface @typeResolver(class: "Magento\\CatalogGraphQl\\Model
377377
product_count: Int @doc(description: "The number of products in the category")
378378
default_sort_by: String @doc(description: "The attribute to use for sorting")
379379
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")
384384
breadcrumbs: [Breadcrumb] @doc(description: "Breadcrumbs, parent categories info") @resolver(class: "Magento\\CatalogGraphQl\\Model\\Resolver\\Category\\Breadcrumbs")
385385
}
386386

@@ -408,8 +408,8 @@ type VirtualProduct implements ProductInterface, CustomizableProductInterface @d
408408
}
409409

410410
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+
}
413413

414414
type Products @doc(description: "The Products object is the top-level object returned in a product search") {
415415
items: [ProductInterface] @doc(description: "An array of products that match the specified search criteria")

0 commit comments

Comments
 (0)