App reviews, troubleshooting, and recommendations
I am developing to cart transform of shopify function and got the error from run.graphql.
Is there any way to set complexity bigger?
Error message: Error while updating drafts: Query has complexity of 33, which exceeds max complexity of 30
run.graphql:
query RunInput { cart { buyerIdentity { email customer { L2101: hasAnyTag(tags: ["L2101"]) L2102: hasAnyTag(tags: ["L2102"]) L2103: hasAnyTag(tags: ["L2103"]) L1101: hasAnyTag(tags: ["L1101"]) L1102: hasAnyTag(tags: ["L1102"]) L1103: hasAnyTag(tags: ["L1103"]) } } lines { id quantity cost { totalAmount { amount currencyCode } } merchandise { __typename ... on ProductVariant { id sku title product { productType title } } } } } shop { productRule: metafield(namespace: "productRule", key: "productRule") { value } } }
Solved! Go to the solution
This is an accepted solution.
You can use `Customer.hasTags` to grab multiple tags in a single field.
To learn more visit the Shopify Help Center or the Community Blog.
Can you merge the customer query to reduce complexity?
customer { L2101: hasAnyTag(tags: ["L2101"]) L2102: hasAnyTag(tags: ["L2102"]) L2103: hasAnyTag(tags: ["L2103"]) L1101: hasAnyTag(tags: ["L1101"]) L1102: hasAnyTag(tags: ["L1102"]) L1103: hasAnyTag(tags: ["L1103"]) }
How to merge them? I would like to get what tag the customer has.
thanks
This is an accepted solution.
You can use `Customer.hasTags` to grab multiple tags in a single field.
To learn more visit the Shopify Help Center or the Community Blog.
Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025