i have a error when write discont shipping fuction “Error while updating drafts: Query has complexity of 31, which exceeds max complexity of 30”. i have found every way, can you guide me how to fix it, i don’t want to lose any data, and expand more later, thank
this is my code:
query RunInput(
$collectionIds: [ID!]
$productTags: [String!]
$customerTags: [String!]
) {
cart {
lines {
quantity
merchandise {
… on ProductVariant {
weight
weightUnit
sku
product {
id
inCollections(ids: $collectionIds) {
isMember
}
hasTags(tags: $productTags) {
hasTag
}
productType
}
}
}
sellingPlanAllocation {
sellingPlan {
recurringDeliveries
}
}
}
buyerIdentity {
purchasingCompany {
company {
id
}
}
customer {
id
hasTags(tags: $customerTags) {
hasTag
}
amountSpent {
amount
}
}
}
attribute {
key
value
}
cost {
subtotalAmount {
amount
}
totalAmount {
amount
}
}
deliveryGroups {
deliveryAddress {
countryCode
}
deliveryOptions {
handle
title
cost {
amount
}
}
}
}
presentmentCurrencyRate
discountNode {
metafield(
key: “function-configuration”
namespace: “$app:shipping-discount”
) {
value
}
}
}