Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove arguments from ProductQueries attribiute
IKarbowiak557870fdc509
diff --git a/saleor/graphql/product/schema.py b/saleor/graphql/product/schema.pyindex e9a2ea9d6b..9c2a51629c 100644--- a/saleor/graphql/product/schema.py+++ b/saleor/graphql/product/schema.py@@ -145,22 +145,6 @@ class ProductQueries(graphene.ObjectType):Attribute,description="List of the shop's attributes.",query=graphene.String(description=DESCRIPTIONS["attributes"]),- in_category=graphene.Argument(- graphene.ID,- description=(- "Return attributes for products belonging to the given category. "- "DEPRECATED: Will be removed in Saleor 2.10, use the `filter` field "- "instead."- ),- ),- in_collection=graphene.Argument(- graphene.ID,- description=(- "Return attributes for products belonging to the given collection. "- "DEPRECATED: Will be removed in Saleor 2.10, use the `filter` "- "field instead."- ),- ),filter=AttributeFilterInput(description="Filtering options for attributes."),sort_by=AttributeSortingInput(description="Sorting options for attributes."),)diff --git a/saleor/graphql/schema.graphql b/saleor/graphql/schema.graphqlindex 2bc6ddc691..14fe2a5fc3 100644--- a/saleor/graphql/schema.graphql+++ b/saleor/graphql/schema.graphql@@ -3488,7 +3488,7 @@ type Query {shippingZones(before: String, after: String, first: Int, last: Int): ShippingZoneCountableConnectiondigitalContent(id: ID!): DigitalContentdigitalContents(before: String, after: String, first: Int, last: Int): DigitalContentCountableConnection- attributes(query: String, inCategory: ID, inCollection: ID, filter: AttributeFilterInput, sortBy: AttributeSortingInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnection+ attributes(query: String, filter: AttributeFilterInput, sortBy: AttributeSortingInput, before: String, after: String, first: Int, last: Int): AttributeCountableConnectionattribute(id: ID!): Attributecategories(query: String, filter: CategoryFilterInput, sortBy: CategorySortingInput, level: Int, before: String, after: String, first: Int, last: Int): CategoryCountableConnectioncategory(id: ID!): Categorydiff --git a/tests/api/test_attributes.py b/tests/api/test_attributes.pyindex 5d1b794c29..e4b51750ee 100644--- a/tests/api/test_attributes.py+++ b/tests/api/test_attributes.py@@ -348,7 +348,6 @@ def test_attributes_filter_by_non_existing_category_id():assert qs == mocked_qs.none.return_value[email protected]("test_deprecated_filter", [True, False])@pytest.mark.parametrize("tested_field", ["inCategory", "inCollection"])def test_attributes_in_collection_query(user_api_client,@@ -356,7 +355,6 @@ def test_attributes_in_collection_query(category,collection,collection_with_products,- test_deprecated_filter,tested_field,):if "Collection" in tested_field:@@ -409,10 +407,7 @@ def test_attributes_in_collection_query(}"""- if test_deprecated_filter:- query = query % {"filter_input": f"{tested_field}: $nodeID"}- else:- query = query % {"filter_input": "filter: { %s: $nodeID }" % tested_field}+ query = query % {"filter_input": "filter: { %s: $nodeID }" % tested_field}variables = {"nodeID": filtered_by_node_id}content = get_graphql_content(user_api_client.post_graphql(query, variables))diff --git a/tests/api/test_graphql.py b/tests/api/test_graphql.pyindex 68c8964e0d..00471a0f67 100644--- a/tests/api/test_graphql.py+++ b/tests/api/test_graphql.py@@ -96,7 +96,7 @@ def test_real_query(user_api_client, product):...ProductListFragmentQuery__typename}- attributes(inCategory: $categoryId, first: 20) {+ attributes(first: 20, filter: {inCategory: $categoryId}) {edges {node {...ProductFiltersFragmentQuery