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.
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024