Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Remove deprecated priceLte and priceGte from product filters

fowczarek06a59206c8ef
diff --git a/saleor/graphql/product/schema.py b/saleor/graphql/product/schema.py
index 90efdab9ec..b7d5b876cf 100644
--- a/saleor/graphql/product/schema.py
+++ b/saleor/graphql/product/schema.py
@@ -195,14 +195,6 @@ class ProductQueries(graphene.ObjectType):
collections=graphene.List(
graphene.ID, description="Filter products by collections."
),
- price_lte=graphene.Float(
- description="""DEPRECATED: Use the "filter" input.
- Filter by price less than or equal to the given value."""
- ),
- price_gte=graphene.Float(
- description="""DEPRECATED: Use the "filter" input.
- Filter by price greater than or equal to the given value."""
- ),
sort_by=graphene.Argument(ProductOrder, description="Sort products."),
stock_availability=graphene.Argument(
StockAvailability, description="Filter products by the stock availability"
diff --git a/tests/api/test_graphql.py b/tests/api/test_graphql.py
index a1c781be1d..6df7991ede 100644
--- a/tests/api/test_graphql.py
+++ b/tests/api/test_graphql.py
@@ -69,7 +69,8 @@ def test_real_query(user_api_client, product):
__typename
}
products(first: $first, sortBy: $sortBy, categories:[$categoryId],
- attributes: $attributesFilter, priceGte: $minPrice, priceLte: $maxPrice) {
+ attributes: $attributesFilter,
+ filter: {price: {gte: $minPrice, lte: $maxPrice}}) {
...ProductListFragmentQuery
__typename