Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Return 'Available sort options' for product listing #3

@paliarush

Description

@paliarush

There is “Product Listing Sort By“ setting in the Magento’s catalog configuration. These options (e.g. Position, Name, Price asc/desc) are used to change default sorting in product listing. And these options are necessary to render the toolbar on the client side. Of course those options could be written as an JS variable during HTML server side rendering but it would be more convenient to get them together with the pagination information.

See how to expose a new query via GraphQL in Magento

Acceptance criteria:

  1. sort_fields field should be added to Products GraphQL type (see Magento/CatalogGraphQl/etc/schema.graphqls )
  2. Changes are covered with web API functional tests. See \Magento\GraphQl\Catalog\ProductViewTest::testQueryAllFieldsSimpleProduct as an example.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions