Skip to content

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

Revert increased cost introduced in 17937 (#18027)

Maciej Korycinskif7e322eafb14
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3d0b57cf70..2b1fdd2be7 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,6 @@ All notable, unreleased changes to this project will be documented in this file.
# 3.22.0 [Unreleased]
### Breaking changes
-- Increased query cost for attribute-related operations due to the addition of `AttributeValue.referencedObject`.
### GraphQL API
- You can now filter and search orders using the new `where` and `search` fields on the `pages` query.
diff --git a/saleor/graphql/query_cost_map.py b/saleor/graphql/query_cost_map.py
index e77510dc3a..c2d55e028a 100644
--- a/saleor/graphql/query_cost_map.py
+++ b/saleor/graphql/query_cost_map.py
@@ -233,11 +233,11 @@ COST_MAP = {
"variant": {"complexity": 1},
},
"Page": {
- "attributes": {"complexity": 100},
+ "attributes": {"complexity": 1},
"pageType": {"complexity": 1},
},
"PageType": {
- "attributes": {"complexity": 100},
+ "attributes": {"complexity": 1},
"availableAttributes": {"complexity": 1, "multipliers": ["first", "last"]},
},
"Payment": {
@@ -245,7 +245,7 @@ COST_MAP = {
"transactions": {"complexity": 1},
},
"Product": {
- "attributes": {"complexity": 100},
+ "attributes": {"complexity": 1},
"category": {"complexity": 1},
"channelListings": {"complexity": 1},
"collections": {"complexity": 1},
@@ -258,7 +258,7 @@ COST_MAP = {
"pricing": {"complexity": 1},
"productType": {"complexity": 1},
"thumbnail": {"complexity": 1},
- "variants": {"complexity": 100},
+ "variants": {"complexity": 1},
"productVariants": {"complexity": 1, "multipliers": ["first", "last"]},
},
"ProductChannelListing": {
@@ -277,7 +277,7 @@ COST_MAP = {
"products": {"complexity": 1, "multipliers": ["first", "last"]},
},
"ProductVariant": {
- "attributes": {"complexity": 100},
+ "attributes": {"complexity": 1},
"channelListings": {"complexity": 1},
"images": {"complexity": 1},
"media": {"complexity": 1},